hoda-react
Version:
<div align="center"> <h1>:construction: flowbite-react (unreleased) :construction:</h1> <p> <a href="https://flowbite-react.com"> <img alt="Flowbite - Tailwind CSS components" width="350" src=".github/assets/flowbite-react-github.png"> <
11 lines (10 loc) • 698 B
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
import classNames from 'classnames';
import { mergeDeep } from '../../helpers/mergeDeep';
import { useTheme } from '../Flowbite/ThemeContext';
import { useNavbarContext } from './NavbarContext';
export const NavbarCollapse = ({ theme: customTheme = {}, children, className, ...props }) => {
const { isOpen } = useNavbarContext();
const theme = mergeDeep(useTheme().theme.navbar.collapse, customTheme);
return (_jsx("div", { className: classNames(theme.base, theme.hidden[!isOpen ? 'on' : 'off'], className), "data-testid": "flowbite-navbar-collapse", ...props, children: _jsx("ul", { className: theme.list, children: children }) }));
};