UNPKG

@transkripid/flowbite-react

Version:

Official React components built for Flowbite and Tailwind CSS - Transkrip.id fork

1 lines 4.83 kB
{"version":3,"file":"Footer.mjs","sources":["../../../src/components/Footer/Footer.tsx"],"sourcesContent":["import type { ComponentProps, FC } from 'react';\nimport { twMerge } from 'tailwind-merge';\nimport { mergeDeep } from '../../helpers/merge-deep';\nimport { getTheme } from '../../theme-store';\nimport type { DeepPartial } from '../../types';\nimport type { FlowbiteFooterBrandTheme } from './FooterBrand';\nimport { FooterBrand } from './FooterBrand';\nimport type { FlowbiteFooterCopyrightTheme } from './FooterCopyright';\nimport { FooterCopyright } from './FooterCopyright';\nimport type { FlowbiteFooterDividerTheme } from './FooterDivider';\nimport { FooterDivider } from './FooterDivider';\nimport type { FlowbiteFooterIconTheme } from './FooterIcon';\nimport { FooterIcon } from './FooterIcon';\nimport { FooterLink } from './FooterLink';\nimport type { FlowbiteFooterLinkGroupTheme } from './FooterLinkGroup';\nimport { FooterLinkGroup } from './FooterLinkGroup';\nimport type { FlowbiteFooterTitleTheme } from './FooterTitle';\nimport { FooterTitle } from './FooterTitle';\n\nexport interface FlowbiteFooterTheme {\n brand: FlowbiteFooterBrandTheme;\n copyright: FlowbiteFooterCopyrightTheme;\n divider: FlowbiteFooterDividerTheme;\n groupLink: FlowbiteFooterLinkGroupTheme;\n icon: FlowbiteFooterIconTheme;\n root: FlowbiteFooterRootTheme;\n title: FlowbiteFooterTitleTheme;\n}\n\nexport interface FlowbiteFooterRootTheme {\n base: string;\n bgDark: string;\n container: string;\n}\n\nexport interface FooterProps extends ComponentProps<'footer'> {\n bgDark?: boolean;\n container?: boolean;\n theme?: DeepPartial<FlowbiteFooterTheme>;\n}\n\nexport const FooterComponent: FC<FooterProps> = ({\n bgDark = false,\n children,\n className,\n container = false,\n theme: customTheme = {},\n ...props\n}) => {\n const theme = mergeDeep(getTheme().footer, customTheme);\n\n return (\n <footer\n data-testid=\"flowbite-footer\"\n className={twMerge(theme.root.base, bgDark && theme.root.bgDark, container && theme.root.container, className)}\n {...props}\n >\n {children}\n </footer>\n );\n};\n\nFooterComponent.displayName = 'Footer';\nFooterCopyright.displayName = 'Footer.Copyright';\nFooterLink.displayName = 'Footer.Link';\nFooterBrand.displayName = 'Footer.Brand';\nFooterLinkGroup.displayName = 'Footer.LinkGroup';\nFooterIcon.displayName = 'Footer.Icon';\nFooterTitle.displayName = 'Footer.Title';\nFooterDivider.displayName = 'Footer.Divider';\n\nexport const Footer = Object.assign(FooterComponent, {\n Copyright: FooterCopyright,\n Link: FooterLink,\n LinkGroup: FooterLinkGroup,\n Brand: FooterBrand,\n Icon: FooterIcon,\n Title: FooterTitle,\n Divider: FooterDivider,\n});\n"],"names":["FooterComponent","t0","$","_c","children","className","props","t1","t2","t3","bgDark","container","theme","undefined","t4","customTheme","t5","t6","mergeDeep","getTheme","footer","twMerge","root","base","t7","displayName","FooterCopyright","FooterLink","FooterBrand","FooterLinkGroup","FooterIcon","FooterTitle","FooterDivider","Footer","Object","assign","Copyright","Link","LinkGroup","Brand","Icon","Title","Divider"],"mappings":";;;;;;;;;;;;AAyCO,MAAMA,IAAmCC,CAAAA,MAAA;AAAAC,QAAAA,IAAAC,EAAA,EAAA;AAAAC,MAAAA,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC;AAAAP,EAAAA,SAAAD,KAAC;AAAA,IAAAS,QAAAH;AAAAA,IAAAH,UAAAA;AAAAA,IAAAC,WAAAA;AAAAA,IAAAM,WAAAH;AAAAA,IAAAI,OAAAH;AAAAA,IAAA,GAAAH;AAAAA,EAAAL,IAAAA,GAOhDC,OAAAD,GAAAC,OAAAE,GAAAF,OAAAG,GAAAH,OAAAI,GAAAJ,OAAAK,GAAAL,OAAAM,GAAAN,OAAAO,MAAAL,IAAAF,EAAA,CAAA,GAAAG,IAAAH,EAAA,CAAA,GAAAI,IAAAJ,EAAA,CAAA,GAAAK,IAAAL,EAAA,CAAA,GAAAM,IAAAN,EAAA,CAAA,GAAAO,IAAAP,EAAA,CAAA;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