import React, { useState } from 'react' import type { ButtonProps } from '~components/ButtonV1' import { StatelessMenu, type StatelessMenuProps } from './subcomponents/StatelessMenu' type ButtonPropsWithOptionalAria = ButtonProps & { 'aria-haspopup'?: boolean 'aria-expanded'?: boolean } export type MenuProps = Omit< StatelessMenuProps, 'renderButton' | 'hideMenuDropdown' | 'toggleMenuDropdown' | 'isMenuVisible' > & { /** * The initial state of the dropdown. Once initalised, further changes to this * prop will not have any affect, as the state is handled internally to the component. * @default: false */ menuVisible?: boolean /** * Takes any ReactElement with button props but is most commonly used with a Kaizen `