| 1 |
import { css } from '@patternfly/react-styles'; |
| 2 |
import styles from '@patternfly/react-styles/css/components/NotificationDrawer/notification-drawer'; |
| 3 |
|
| 4 |
export interface NotificationDrawerListProps extends React.HTMLProps<HTMLUListElement> { |
| 5 |
/** Content rendered inside the notification drawer list body */ |
| 6 |
children?: React.ReactNode; |
| 7 |
/** Additional classes added to the notification drawer list body */ |
| 8 |
className?: string; |
| 9 |
/** Adds styling to the notification drawer list to indicate expand/hide state */ |
| 10 |
isHidden?: boolean; |
| 11 |
/** Adds an accessible label to the notification drawer list. */ |
| 12 |
'aria-label'?: string; |
| 13 |
} |
| 14 |
|
| 15 |
export const NotificationDrawerList: React.FunctionComponent<NotificationDrawerListProps> = ({ |
| 16 |
children, |
| 17 |
className = '', |
| 18 |
isHidden = false, |
| 19 |
'aria-label': ariaLabel, |
| 20 |
...props |
| 21 |
}: NotificationDrawerListProps) => ( |
| 22 |
<ul |
| 23 |
{...props} |
| 24 |
className={css(`${styles.notificationDrawer}__list`, className)} |
| 25 |
hidden={isHidden} |
| 26 |
role="list" |
| 27 |
aria-label={ariaLabel} |
| 28 |
> |
| 29 |
{children} |
| 30 |
</ul> |
| 31 |
); |
| 32 |
NotificationDrawerList.displayName = 'NotificationDrawerList'; |