flowbite-react
Version:
Official React components built for Flowbite and Tailwind CSS
16 lines (13 loc) • 648 B
JavaScript
import { jsxs, jsx } from 'react/jsx-runtime';
import { twMerge } from 'tailwind-merge';
import { mergeDeep } from '../../helpers/merge-deep.mjs';
import { getTheme } from '../../theme-store/index.mjs';
const ListItem = ({ children, className, icon: Icon, theme: customTheme = {}, ...props }) => {
const theme = mergeDeep(getTheme().list.item, customTheme);
return /* @__PURE__ */ jsxs("li", { className: twMerge(theme.withIcon[Icon ? "on" : "off"], className), ...props, children: [
Icon && /* @__PURE__ */ jsx(Icon, { className: twMerge(theme.icon) }),
children
] });
};
export { ListItem };
//# sourceMappingURL=ListItem.mjs.map