UNPKG

flowbite-react

Version:

Official React components built for Flowbite and Tailwind CSS

1 lines 2.57 kB
{"version":3,"file":"FooterBrand.mjs","sources":["../../../../src/components/Footer/FooterBrand.tsx"],"sourcesContent":["import type { ComponentProps, FC, PropsWithChildren } from \"react\";\nimport { twMerge } from \"tailwind-merge\";\nimport { mergeDeep } from \"../../helpers/merge-deep\";\nimport { getTheme } from \"../../theme-store\";\nimport type { DeepPartial } from \"../../types\";\n\nexport interface FlowbiteFooterBrandTheme {\n base: string;\n img: string;\n span: string;\n}\n\nexport interface FooterBrandProps extends PropsWithChildren {\n alt?: string;\n className?: string;\n href?: string;\n name?: string;\n src: string;\n theme?: DeepPartial<FlowbiteFooterBrandTheme>;\n}\n\nexport const FooterBrand: FC<FooterBrandProps & ComponentProps<\"a\"> & ComponentProps<\"img\">> = ({\n alt,\n className,\n children,\n href,\n name,\n src,\n theme: customTheme = {},\n ...props\n}) => {\n const theme = mergeDeep(getTheme().footer.brand, customTheme);\n\n return (\n <div>\n {href ? (\n <a data-testid=\"flowbite-footer-brand\" href={href} className={twMerge(theme.base, className)} {...props}>\n <img alt={alt} src={src} className={theme.img} />\n <span data-testid=\"flowbite-footer-brand-span\" className={theme.span}>\n {name}\n </span>\n {children}\n </a>\n ) : (\n <img\n alt={alt}\n data-testid=\"flowbite-footer-brand\"\n src={src}\n className={twMerge(theme.img, className)}\n {...props}\n />\n )}\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;AAKY,MAAC,WAAW,GAAG,CAAC;AAC5B,EAAE,GAAG;AACL,EAAE,SAAS;AACX,EAAE,QAAQ;AACV,EAAE,IAAI;AACN,EAAE,IAAI;AACN,EAAE,GAAG;AACL,EAAE,KAAK,EAAE,WAAW,GAAG,EAAE;AACzB,EAAE,GAAG,KAAK;AACV,CAAC,KAAK;AACN,EAAE,MAAM,KAAK,GAAG,SAAS,CAAC,QAAQ,EAAE,CAAC,MAAM,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;AAChE,EAAE,uBA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