UNPKG

@helpwave/hightide

Version:

helpwave's component and theming library

25 lines (22 loc) 921 B
import * as react_jsx_runtime from 'react/jsx-runtime'; import { PropsWithChildren, RefObject, ReactNode } from 'react'; type MenuProps<T> = PropsWithChildren<{ trigger: (onClick: () => void, ref: RefObject<T>) => ReactNode; /** * @default 'tl' */ alignment?: 'tl' | 'tr' | 'bl' | 'br' | '_l' | '_r' | 't_' | 'b_'; showOnHover?: boolean; menuClassName?: string; }>; type MenuItemProps = { onClick?: () => void; alignment?: 'left' | 'right'; className?: string; }; declare const MenuItem: ({ children, onClick, alignment, className }: PropsWithChildren<MenuItemProps>) => react_jsx_runtime.JSX.Element; /** * A Menu Component to allow the user to see different functions */ declare const Menu: <T extends HTMLElement>({ trigger, children, alignment, showOnHover, menuClassName, }: MenuProps<T>) => react_jsx_runtime.JSX.Element; export { Menu, MenuItem, type MenuItemProps };