UNPKG

@heroui/navbar

Version:

A responsive navigation header positioned on top side of your page that includes support for branding, links, navigation, collapse and more.

26 lines (23 loc) 879 B
"use client"; import { useNavbarContext } from "./chunk-IGERPFKH.mjs"; // src/navbar-brand.tsx import { forwardRef } from "@heroui/system"; import { useDOMRef } from "@heroui/react-utils"; import { cn } from "@heroui/theme"; import { jsx } from "react/jsx-runtime"; var NavbarBrand = forwardRef((props, ref) => { var _a; const { as, className, children, ...otherProps } = props; const Component = as || "div"; const domRef = useDOMRef(ref); const { slots, classNames } = useNavbarContext(); const styles = cn(classNames == null ? void 0 : classNames.brand, className); return /* @__PURE__ */ jsx(Component, { ref: domRef, className: (_a = slots.brand) == null ? void 0 : _a.call(slots, { class: styles }), ...otherProps, children }); }); NavbarBrand.displayName = "HeroUI.NavbarBrand"; var navbar_brand_default = NavbarBrand; export { navbar_brand_default };