import * as React from 'react'; import styles from '@patternfly/react-styles/css/components/Nav/nav'; import { css } from '@patternfly/react-styles'; import AngleRightIcon from '@patternfly/react-icons/dist/esm/icons/angle-right-icon'; import { getUniqueId } from '../../helpers/util'; import { NavContext } from './Nav'; import { PageSidebarContext } from '../Page/PageSidebar'; import { PickOptional } from '../../helpers/typeUtils'; import { getOUIAProps, OUIAProps, getDefaultOUIAId } from '../../helpers'; export interface NavExpandableProps extends Omit, HTMLLIElement>, 'title'>, OUIAProps { /** Title content shown for the expandable list */ title: React.ReactNode; /** If defined, screen readers will read this text instead of the list title */ srText?: string; /** Boolean to programatically expand or collapse section */ isExpanded?: boolean; /** Anything that can be rendered inside of the expandable list */ children?: React.ReactNode; /** Additional classes added to the container */ className?: string; /** Group identifier, will be returned with the onToggle and onSelect callback passed to the Nav component */ groupId?: string | number; /** If true makes the expandable list title active */ isActive?: boolean; /** Identifier to use for the section aria label */ id?: string; /** allow consumer to optionally override this callback and manage expand state externally. if passed will not call Nav's onToggle. */ onExpand?: (event: React.MouseEvent, val: boolean) => void; /** Additional props added to the NavExpandable )} )} ); } } export { NavExpandable };