UNPKG

@awsui/components-react

Version:

On July 19th, 2022, we launched [Cloudscape Design System](https://cloudscape.design). Cloudscape is an evolution of AWS-UI. It consists of user interface guidelines, front-end components, design resources, and development tools for building intuitive, en

15 lines 583 B
/** * @returns attributes for a menuitem widget given parameters */ export const getMenuItemProps = ({ disabled, parent, expanded, }) => ({ role: 'menuitem', 'aria-disabled': disabled ? 'true' : undefined, 'aria-haspopup': parent ? 'true' : undefined, 'aria-expanded': expanded ? 'true' : parent ? 'false' : undefined, }); export const getMenuItemCheckboxProps = ({ disabled, checked, }) => ({ role: 'menuitemcheckbox', 'aria-disabled': disabled ? 'true' : undefined, 'aria-checked': checked ? 'true' : 'false', }); //# sourceMappingURL=menu-item.js.map