mirror of
https://github.com/supabase/supabase.git
synced 2026-07-03 10:14:22 +08:00
* first pass * init * updated types * fix up key reveal * Update QuickKeyCopy.tsx * remove quick key copy * api key pill now only allows reveal and copy if you have perm * Update LegacyAPIKeys.tsx * fix up layouts * fix copy * Fix action menu dropdown position, few small nudges * Remove unused files. * Remove the hardcoded and rename the feature flag for basic API keys. * add support for name and description, some smaller improvements * Fix the trims for the description. --------- Co-authored-by: Terry Sutton <saltcod@gmail.com> Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com> Co-authored-by: Stojan Dimitrovski <sdimitrovski@gmail.com>
37 lines
862 B
TypeScript
37 lines
862 B
TypeScript
import { ReactNode } from 'react'
|
|
import { cn } from 'ui'
|
|
import { DocsButton } from '../DocsButton'
|
|
|
|
const FormHeader = ({
|
|
title,
|
|
description,
|
|
docsUrl,
|
|
actions,
|
|
className,
|
|
}: {
|
|
title: string
|
|
description?: string
|
|
docsUrl?: string
|
|
actions?: ReactNode
|
|
className?: string
|
|
}) => {
|
|
return (
|
|
<div
|
|
className={cn(
|
|
`w-full mb-6 flex flex-col sm:flex-row md:items-center justify-between gap-4 ${className}`
|
|
)}
|
|
>
|
|
<div className="space-y-1">
|
|
<h3 className="text-foreground text-xl prose">{title}</h3>
|
|
{description && <div className="prose text-sm max-w-2xl">{description}</div>}
|
|
</div>
|
|
<div className="flex flex-col sm:flex-row md:items-center gap-x-2">
|
|
{docsUrl !== undefined && <DocsButton href={docsUrl} />}
|
|
{actions}
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export { FormHeader }
|