mirror of
https://github.com/supabase/supabase.git
synced 2026-07-06 00:04:23 +08:00
* add docs, and creds management * FIx api types. * add accesskey to table * cmt * fix issues, url, styles, rm unused mutation keys * Apply suggestions from code review Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com> * renaming of things and use correct compos * Update apps/studio/components/to-be-cleaned/Storage/StorageSettings/S3Connection.tsx Co-authored-by: Inian <inian1234@gmail.com> * rename storage url to endpoint * when a user clicks the X after creating a credential, reset the form * Fix button component disabled state when loading is true, and add docs url to s3 connection section * Fixes * fix btn disabled prop not reaching btn --------- Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com> Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com> Co-authored-by: Inian <inian1234@gmail.com> Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
47 lines
1.2 KiB
TypeScript
47 lines
1.2 KiB
TypeScript
import { ExternalLink } from 'lucide-react'
|
|
import Link from 'next/link'
|
|
import ReactMarkdown from 'react-markdown'
|
|
|
|
import { Markdown } from 'components/interfaces/Markdown'
|
|
import { Button } from 'ui'
|
|
import { ReactNode } from 'react'
|
|
|
|
const FormHeader = ({
|
|
title,
|
|
description,
|
|
docsUrl,
|
|
actions,
|
|
className,
|
|
}: {
|
|
title: string
|
|
description?: string
|
|
docsUrl?: string
|
|
actions?: ReactNode
|
|
className?: string
|
|
}) => {
|
|
return (
|
|
<div className={`mb-6 flex items-center justify-between ${className}`}>
|
|
<div className="space-y-1">
|
|
<h3 className="text-foreground text-xl">
|
|
<ReactMarkdown unwrapDisallowed disallowedElements={['p']}>
|
|
{title}
|
|
</ReactMarkdown>
|
|
</h3>
|
|
{description && <Markdown content={description} className="max-w-full" />}
|
|
</div>
|
|
<div className="flex items-center gap-x-2">
|
|
{docsUrl !== undefined && (
|
|
<Button asChild type="default" icon={<ExternalLink size={14} />}>
|
|
<Link href={docsUrl} target="_blank" rel="noreferrer">
|
|
Documentation
|
|
</Link>
|
|
</Button>
|
|
)}
|
|
{actions}
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export { FormHeader }
|