CustomDocument.tsx 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. import { ExternalLink } from 'lucide-react'
  2. import { Button } from 'ui'
  3. import {
  4. ScaffoldContainer,
  5. ScaffoldSection,
  6. ScaffoldSectionContent,
  7. ScaffoldSectionDetail,
  8. } from '@/components/layouts/Scaffold'
  9. import { CustomContentTypes } from '@/hooks/custom-content/CustomContent.types'
  10. interface CustomDocumentProps {
  11. doc: CustomContentTypes['organizationLegalDocuments'][number]
  12. }
  13. export const CustomDocument = ({ doc }: CustomDocumentProps) => {
  14. return (
  15. <ScaffoldContainer id={doc.id}>
  16. <ScaffoldSection className="py-12">
  17. <ScaffoldSectionDetail>
  18. <p className="text-base m-0">{doc.name}</p>
  19. <div className="space-y-2 text-sm text-foreground-light [&_p]:m-0">
  20. <p>{doc.description}</p>
  21. </div>
  22. </ScaffoldSectionDetail>
  23. <ScaffoldSectionContent>
  24. <div className="@lg:flex items-center justify-center h-full">
  25. <Button asChild type="default" iconRight={<ExternalLink />}>
  26. <a download href={doc.action.url} target="_blank" rel="noreferrer noopener">
  27. {doc.action.text}
  28. </a>
  29. </Button>
  30. </div>
  31. </ScaffoldSectionContent>
  32. </ScaffoldSection>
  33. </ScaffoldContainer>
  34. )
  35. }