Files
supabase/apps/studio/components/ui/Forms/FormHeader.tsx
T
Kevin Grüneberg 2a5072d722 chore: replace Markdown component in some generic studio components (#30666)
We no longer want to use Markdown when not necessary. I checked the props for these components and we were only passing in a regular text without any actual markdown
2024-11-26 19:56:50 +08:00

33 lines
783 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(`mb-6 flex items-center justify-between gap-x-4 ${className}`)}>
<div className="space-y-1">
<h3 className="text-foreground text-xl prose">{title}</h3>
{description && <div className="prose text-sm max-w-full">{description}</div>}
</div>
<div className="flex items-center gap-x-2">
{docsUrl !== undefined && <DocsButton href={docsUrl} />}
{actions}
</div>
</div>
)
}
export { FormHeader }