UNPKG

@stihl-design-system/components

Version:

Welcome to the STIHL Design System react component library.

33 lines (32 loc) 1.53 kB
import { HTMLProps, JSX } from 'react'; import { OpenChangeReason } from '@floating-ui/react'; export interface MegaMenuProps { /** Content within the MegaMenu. */ children?: React.ReactNode; /** Opens the MegaMenu on initial render. * @default false */ initialOpen?: boolean; /** Controls the open state of the MegaMenu. If provided, it will be a controlled component. * @default false */ isOpen?: boolean; /** A function that is called when the open state should change. */ onOpenChange?: (isOpen: boolean, event?: Event, reason?: OpenChangeReason) => void; } /** * The MegaMenu component is used to display additional information or actions related to an anchor element. It can be positioned relative to the anchor and supports various placements and offsets. * * Design in Figma: [MegaMenu](https://www.figma.com/design/Ie2r0R9QwjEc7O3nrFbXhV/branch/dDZiDou9UpPtHIF2bXkLKL/Web-Pattern-Library?node-id=6869-65546&t=PkzLITphHlu1XJKT-11) * */ export declare const DSMegaMenu: { ({ children, ...rest }: MegaMenuProps): JSX.Element; /** attach static members */ Anchor: import('react').ForwardRefExoticComponent<Omit<HTMLProps<HTMLElement> & MegaMenuAnchorProps, "ref"> & import('react').RefAttributes<HTMLElement>>; Content: import('react').ForwardRefExoticComponent<Omit<HTMLProps<HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>; displayName: string; }; interface MegaMenuAnchorProps { children: React.ReactNode; } export {};