UNPKG

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"> <

14 lines (13 loc) 869 B
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import classNames from 'classnames'; import { useId } from 'react'; import { useTheme } from '../Flowbite/ThemeContext'; import { useSidebarContext } from './SidebarContext'; const SidebarLogo = ({ children, href, img, imgAlt = '', className, ...props }) => { const id = useId(); const { isCollapsed } = useSidebarContext(); const theme = useTheme().theme.sidebar.logo; return (_jsxs("a", { "aria-labelledby": `flowbite-sidebar-logo-${id}`, className: classNames(theme.base, className), href: href, ...props, children: [_jsx("img", { alt: imgAlt, className: theme.img, src: img }), _jsx("span", { className: theme.collapsed[isCollapsed ? 'on' : 'off'], id: `flowbite-sidebar-logo-${id}`, children: children })] })); }; SidebarLogo.displayName = 'Sidebar.Logo'; export default SidebarLogo;