Files
supabase/apps/studio/components/ui/Forms/FormHeader.tsx
T
Ivan VasilovandJoshen Lim b73317fc67 feat: Pricing for TPA (#28454)
* Don't set fixed height on the generateSecret button in hooks sheet.

* Block two of the TPA providers on free plan orgs.

* Fix some copy. Add more explanation about the pricing.

* Update copy

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-08-14 11:01:58 +02:00

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 { ReactNode } from 'react'
import { Button, cn } from 'ui'
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 ${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 }