mirror of
https://github.com/supabase/supabase.git
synced 2026-06-16 02:26:42 +08:00
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
39 lines
1.2 KiB
TypeScript
39 lines
1.2 KiB
TypeScript
import { ExternalLink } from 'lucide-react'
|
|
import { Button } from 'ui'
|
|
|
|
import {
|
|
ScaffoldContainer,
|
|
ScaffoldSection,
|
|
ScaffoldSectionContent,
|
|
ScaffoldSectionDetail,
|
|
} from '@/components/layouts/Scaffold'
|
|
import { CustomContentTypes } from '@/hooks/custom-content/CustomContent.types'
|
|
|
|
interface CustomDocumentProps {
|
|
doc: CustomContentTypes['organizationLegalDocuments'][number]
|
|
}
|
|
|
|
export const CustomDocument = ({ doc }: CustomDocumentProps) => {
|
|
return (
|
|
<ScaffoldContainer id={doc.id}>
|
|
<ScaffoldSection className="py-12">
|
|
<ScaffoldSectionDetail>
|
|
<p className="text-base m-0">{doc.name}</p>
|
|
<div className="space-y-2 text-sm text-foreground-light [&_p]:m-0">
|
|
<p>{doc.description}</p>
|
|
</div>
|
|
</ScaffoldSectionDetail>
|
|
<ScaffoldSectionContent>
|
|
<div className="@lg:flex items-center justify-center h-full">
|
|
<Button asChild type="default" iconRight={<ExternalLink />}>
|
|
<a download href={doc.action.url} target="_blank" rel="noreferrer noopener">
|
|
{doc.action.text}
|
|
</a>
|
|
</Button>
|
|
</div>
|
|
</ScaffoldSectionContent>
|
|
</ScaffoldSection>
|
|
</ScaffoldContainer>
|
|
)
|
|
}
|