mirror of
https://github.com/supabase/supabase.git
synced 2026-12-03 23:18:57 +00:00
## Context Housekeeping to deprecate more deprecated UI components, this one's focusing on the `Scaffold` components. The main visual differences are just the width within PageSections since the new components where the right content takes up a bit more width than the left content. (Ref org billing + usage) Starting the refactor with the organization pages: - Billing - Team - Usage - Settings -> SSO - Settings -> Security - Settings -> Audit Logs - Settings -> Documents
42 lines
1.3 KiB
TypeScript
42 lines
1.3 KiB
TypeScript
import { ExternalLinkIcon } from 'lucide-react'
|
|
import { Button } from 'ui'
|
|
import { PageContainer } from 'ui-patterns/PageContainer'
|
|
import {
|
|
PageSection,
|
|
PageSectionContent,
|
|
PageSectionDescription,
|
|
PageSectionMeta,
|
|
PageSectionSummary,
|
|
PageSectionTitle,
|
|
} from 'ui-patterns/PageSection'
|
|
|
|
import { CustomContentTypes } from '@/hooks/custom-content/CustomContent.types'
|
|
|
|
interface CustomDocumentProps {
|
|
doc: CustomContentTypes['organizationLegalDocuments'][number]
|
|
}
|
|
|
|
export const CustomDocument = ({ doc }: CustomDocumentProps) => {
|
|
return (
|
|
<PageContainer id={doc.id}>
|
|
<PageSection orientation="horizontal">
|
|
<PageSectionMeta>
|
|
<PageSectionSummary>
|
|
<PageSectionTitle>{doc.name}</PageSectionTitle>
|
|
<PageSectionDescription>{doc.description}</PageSectionDescription>
|
|
</PageSectionSummary>
|
|
</PageSectionMeta>
|
|
<PageSectionContent>
|
|
<div className="@lg:flex items-center justify-center h-full">
|
|
<Button asChild iconRight={<ExternalLinkIcon />}>
|
|
<a download href={doc.action.url} target="_blank" rel="noreferrer noopener">
|
|
{doc.action.text}
|
|
</a>
|
|
</Button>
|
|
</div>
|
|
</PageSectionContent>
|
|
</PageSection>
|
|
</PageContainer>
|
|
)
|
|
}
|