import React from "react"; import { MaxWidthProps } from "styled-system"; import { VariantType } from "../../menu-item"; export interface SubmenuProps { /** Children elements */ children: React.ReactNode; /** Custom className */ className?: string; /** * * List of supported icons * * Adds an icon to the menu item. * */ icon?: string; /** Defines which direction the submenu will hang eg. left/right */ submenuDirection?: string; /** A title for the menu item that has a submenu. */ title?: React.ReactNode; /** onKeyDown handler */ onKeyDown?: (event: React.KeyboardEvent | React.KeyboardEvent) => void; /** set the colour variant for a menuType */ variant?: VariantType; /** Flag to display the dropdown arrow when an item has a submenu */ showDropdownArrow?: boolean; /** When set the submenu opens by click instead of hover */ clickToOpen?: boolean; /** The href to use for the menu item. */ href?: string; /** Maximum width. Any valid CSS string */ maxWidth?: MaxWidthProps["maxWidth"]; /** Used to set a submenu parent to passive styling in MenuFullscreen */ asPassiveItem?: boolean; /** Callback triggered when submenu opens. Only valid with submenu prop */ onSubmenuOpen?: () => void; /** Callback triggered when submenu closes. Only valid with submenu prop */ onSubmenuClose?: () => void; /** Callback triggered when the top-level menu item is clicked */ onClick?: (event: React.MouseEvent | React.MouseEvent) => void; /** Accessible label for when no text children are passed to menu item */ ariaLabel?: string; /** Sets the max-width of the submenu container element */ submenuMaxWidth?: string; /** Sets the min-width of the submenu container element */ submenuMinWidth?: string; } declare const Submenu: React.ForwardRefExoticComponent>; export default Submenu;