Files
supabase/apps/studio/components/ui/Forms/FormHeader.tsx
T
Ivan Vasilov 436bdb10ae chore: Move the studio app to apps/studio (#18915)
* Move all studio files from /studio to /apps/studio.

* Move studio specific prettier ignores.

* Fix the ui references from studio.

* Fix the css imports.

* Fix all package.json issues.

* Fix the prettier setup for the studio app.

* Add .turbo folder to prettierignore.

* Fix the github workflows.
2023-11-15 12:38:55 +01:00

40 lines
995 B
TypeScript

import Link from 'next/link'
import ReactMarkdown from 'react-markdown'
import { Button, IconExternalLink } from 'ui'
const FormHeader = ({
title,
description,
docsUrl,
}: {
title: string
description?: string
docsUrl?: string
}) => {
return (
<div className="mb-6 flex items-center justify-between">
<div className="space-y-1">
<h3 className="text-foreground text-xl">
<ReactMarkdown unwrapDisallowed disallowedElements={['p']}>
{title}
</ReactMarkdown>
</h3>
{description && (
<div className="text-foreground-lighter text-sm">
<ReactMarkdown>{description}</ReactMarkdown>
</div>
)}
</div>
{docsUrl !== undefined && (
<Button asChild type="default" icon={<IconExternalLink />}>
<Link href={docsUrl} target="_blank" rel="noreferrer">
Documentation
</Link>
</Button>
)}
</div>
)
}
export { FormHeader }