UNPKG

@olleemilsson/flowbite-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"> <

12 lines (11 loc) 684 B
import { jsx as _jsx } from "react/jsx-runtime"; import classNames from 'classnames'; import { mergeDeep } from '../../helpers/mergeDeep'; import { useTheme } from '../Flowbite/ThemeContext'; export const NavbarLink = ({ active, disabled, href, theme: customTheme = {}, children, className, ...props }) => { const theme = mergeDeep(useTheme().theme.navbar.link, customTheme); return (_jsx("li", { children: _jsx("a", { href: href, className: classNames(theme.base, { [theme.active.on]: active, [theme.active.off]: !active && !disabled, }, theme.disabled[disabled ? 'on' : 'off'], className), ...props, children: children }) })); };