UNPKG

@transkripid/flowbite-react

Version:

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

1 lines 2.56 kB
{"version":3,"file":"TimelineTitle.mjs","sources":["../../../src/components/Timeline/TimelineTitle.tsx"],"sourcesContent":["'use client';\n\nimport type { ComponentProps, FC } from 'react';\nimport { twMerge } from 'tailwind-merge';\nimport { mergeDeep } from '../../helpers/merge-deep';\nimport type { DeepPartial } from '../../types';\nimport type { FlowbiteHeadingLevel } from '../Flowbite';\nimport { useTimelineContentContext } from './TimelineContentContext';\n\nexport interface FlowbiteTimelineTitleTheme {\n base: string;\n}\n\nexport interface TimelineTitleProps extends ComponentProps<'h1'> {\n as?: FlowbiteHeadingLevel;\n theme?: DeepPartial<FlowbiteTimelineTitleTheme>;\n}\n\nexport const TimelineTitle: FC<TimelineTitleProps> = ({\n as: Tag = 'h3',\n children,\n className,\n theme: customTheme = {},\n ...props\n}) => {\n const { theme: contentTheme } = useTimelineContentContext();\n\n const theme = mergeDeep(contentTheme.title, customTheme);\n\n return (\n <Tag className={twMerge(theme.base, className)} {...props}>\n {children}\n </Tag>\n );\n};\n"],"names":["TimelineTitle","t0","$","_c","children","className","props","t1","t2","as","theme","Tag","undefined","t3","customTheme","contentTheme","useTimelineContentContext","T0","t4","title","mergeDeep","twMerge","base","t5"],"mappings":";;;;;AAkBO,MAAMA,IAAwCC,CAAAA,MAAA;AAAAC,QAAAA,IAAAC,EAAA,EAAA;AAAAC,MAAAA,GAAAC,GAAAC,GAAAC,GAAAC;AAAAN,EAAAA,SAAAD,KAAC;AAAA,IAAAQ,IAAAF;AAAAA,IAAAH,UAAAA;AAAAA,IAAAC,WAAAA;AAAAA,IAAAK,OAAAF;AAAAA,IAAA,GAAAF;AAAAA,EAAAL,IAAAA,GAMrDC,OAAAD,GAAAC,OAAAE,GAAAF,OAAAG,GAAAH,OAAAI,GAAAJ,OAAAK,GAAAL,OAAAM,MAAAJ,IAAAF,EAAA,CAAA,GAAAG,IAAAH,EAAA,CAAA,GA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