flowbite-react
Version:
Official React components built for Flowbite and Tailwind CSS
1 lines • 2.01 kB
Source Map (JSON)
{"version":3,"file":"Breadcrumb.mjs","sources":["../../../../src/components/Breadcrumb/Breadcrumb.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 { FlowbiteBreadcrumbItemTheme } from \"./BreadcrumbItem\";\nimport { BreadcrumbItem } from \"./BreadcrumbItem\";\n\nexport interface FlowbiteBreadcrumbTheme {\n root: FlowbiteBreadcrumbRootTheme;\n item: FlowbiteBreadcrumbItemTheme;\n}\n\nexport interface FlowbiteBreadcrumbRootTheme {\n base: string;\n list: string;\n}\n\nexport interface BreadcrumbComponentProps extends ComponentProps<\"nav\"> {\n theme?: DeepPartial<FlowbiteBreadcrumbRootTheme>;\n}\n\nconst BreadcrumbComponent: FC<BreadcrumbComponentProps> = ({\n children,\n className,\n theme: customTheme = {},\n ...props\n}) => {\n const theme = mergeDeep(getTheme().breadcrumb.root, customTheme);\n\n return (\n <nav aria-label=\"Breadcrumb\" className={twMerge(theme.base, className)} {...props}>\n <ol className={theme.list}>{children}</ol>\n </nav>\n );\n};\n\nBreadcrumbComponent.displayName = \"Breadcrumb\";\n\nexport const Breadcrumb = Object.assign(BreadcrumbComponent, {\n Item: BreadcrumbItem,\n});\n"],"names":[],"mappings":";;;;;;AAMA,MAAM,mBAAmB,GAAG,CAAC;AAC7B,EAAE,QAAQ;AACV,EAAE,SAAS;AACX,EAAE,KAAK,EAAE,WAAW,GAAG,EAAE;AACzB,EAAE,GAAG,KAAK;AACV,CAAC,KAAK;AACN,EAAE,MAAM,KAAK,GAAG,SAAS,CAAC,QAAQ,EAAE,CAAC,UAAU,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;AACnE,EAAE,uBAAuB,GAAG,CAAC,KAAK,EAAE,EAAE,YAAY,EAAE,YAAY,EAAE,SAAS,EAAE,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC,EAAE,GAAG,KAAK,EAAE,QAAQ,kBAAkB,GAAG,CAAC,IAAI,EAAE,EAAE,SAAS,EAAE,KAAK,CAAC,IAAI,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC,CAAC;AACnM,CAAC,CAAC;AACF,mBAAmB,CAAC,WAAW,GAAG,YAAY,CAAC;AACnC,MAAC,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,mBAAmB,EAAE;AAC7D,EAAE,IAAI,EAAE,cAAc;AACtB,CAAC;;;;"}