UNPKG

@postenbring/hedwig-react

Version:

React components for [Hedwig Design System](https://github.com/bring/hedwig-design-system).

130 lines 5.1 kB
import { forwardRef, type HTMLAttributes } from "react"; import { NavbarExpandableMenu, NavbarExpandableMenuContent, NavbarExpandableMenuTrigger } from "./navbar-expandable-menu"; interface NavbarLogoProps extends React.HTMLAttributes<HTMLDivElement> { /** * Change the default rendered element for the one passed as a child, merging their props and behavior. * * @default false */ asChild?: boolean; } /** * A fixed Posten or Bring logo. * * The logo follows the brand theme, so if the class `hds-theme-bring` is set the Bring logo will be shown instead of the Posten logo */ export declare const NavbarLogo: import("react").ForwardRefExoticComponent<NavbarLogoProps & import("react").RefAttributes<HTMLDivElement>>; interface NavbarLogoAndServiceText extends HTMLAttributes<HTMLDivElement> { /** * The text display next to the logo */ children: React.ReactNode; /** * The text variant * * Use `service` for internal applications * * Use `flagship` for public facing applications */ variant: "service" | "flagship"; /** * Change the default rendered element for the one passed as a child, merging their props and behavior. * * @default false */ asChild?: boolean; } /** * Internal service or flagship text next to either the Posten or Bring logo * * The logo follows the brand theme, so if the class `hds-theme-bring` is set the Bring logo will be shown instead of the Posten logo */ export declare const NavbarLogoAndServiceText: import("react").ForwardRefExoticComponent<NavbarLogoAndServiceText & import("react").RefAttributes<HTMLDivElement>>; interface NavbarItemIconProps extends React.HTMLAttributes<HTMLDivElement> { children: React.ReactNode; } /** * Icon to be used inside a `Navbar.Item`, `Navbar.ButtonItem`, or `Navbar.LinkItem` */ export declare const NavbarItemIcon: import("react").ForwardRefExoticComponent<NavbarItemIconProps & import("react").RefAttributes<HTMLDivElement>>; interface NavbarItemProps extends React.HTMLAttributes<HTMLDivElement> { children: React.ReactNode; /** * Change the default rendered element for the one passed as a child, merging their props and behavior. * * @default false */ asChild?: boolean; } /** * Generic Navbar item * * Use `Navbar.ButtonItem` or `Navbar.LinkItem` for links and buttons */ export declare const NavbarItem: import("react").ForwardRefExoticComponent<NavbarItemProps & import("react").RefAttributes<HTMLDivElement>>; interface NavbarButtonItemProps extends React.ButtonHTMLAttributes<HTMLButtonElement> { children: React.ReactNode; /** * Change the default rendered element for the one passed as a child, merging their props and behavior. * * @default false */ asChild?: boolean; } export declare const NavbarButtonItem: import("react").ForwardRefExoticComponent<NavbarButtonItemProps & import("react").RefAttributes<HTMLButtonElement>>; interface NavbarLinkItemProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> { children: React.ReactNode; /** * Change the default rendered element for the one passed as a child, merging their props and behavior. * * @default false */ asChild?: boolean; } export declare const NavbarLinkItem: import("react").ForwardRefExoticComponent<NavbarLinkItemProps & import("react").RefAttributes<HTMLAnchorElement>>; interface NavbarNavigationProps extends React.HTMLAttributes<HTMLDivElement> { children: React.ReactNode; /** * Change the default rendered element for the one passed as a child, merging their props and behavior. * * @default false */ asChild?: boolean; } export declare const NavbarNavigation: import("react").ForwardRefExoticComponent<NavbarNavigationProps & import("react").RefAttributes<HTMLDivElement>>; export interface NavbarProps extends HTMLAttributes<HTMLElement> { /** * Navbar variant * * By default the `posten.no` variant is used which has a fixed logo and a fixed height of 112px * * For internal services or flagship services use the `service` should be used * * @default "default" */ variant?: "default" | "service"; /** * Change the default rendered element for the one passed as a child, merging their props and behavior. * * @default false */ asChild?: boolean; } /** * 🚨 WORK IN PROGRESS 🚨 */ export declare const Navbar: NavbarType; type NavbarType = ReturnType<typeof forwardRef<HTMLDivElement, NavbarProps>> & { Logo: typeof NavbarLogo; LogoAndServiceText: typeof NavbarLogoAndServiceText; ExpandableMenu: typeof NavbarExpandableMenu; ExpandableMenuTrigger: typeof NavbarExpandableMenuTrigger; ExpandableMenuContent: typeof NavbarExpandableMenuContent; Item: typeof NavbarItem; ButtonItem: typeof NavbarButtonItem; LinkItem: typeof NavbarLinkItem; ItemIcon: typeof NavbarItemIcon; Navigation: typeof NavbarNavigation; }; export {}; //# sourceMappingURL=navbar.d.ts.map