Debian Codegraph @

node/@patternfly/react-core/src/components/NotificationDrawer/NotificationDrawerListItemBody.tsx

raw
1 import { Fragment } from 'react';
2 import { css } from '@patternfly/react-styles';
3 import styles from '@patternfly/react-styles/css/components/NotificationDrawer/notification-drawer';
4
5 export interface NotificationDrawerListItemBodyProps extends React.HTMLProps<HTMLDivElement> {
6 /** Content rendered inside the list item body */
7 children?: React.ReactNode;
8 /** Additional classes added to the list item body */
9 className?: string;
10 /** List item timestamp */
11 timestamp?: React.ReactNode;
12 }
13
14 export const NotificationDrawerListItemBody: React.FunctionComponent<NotificationDrawerListItemBodyProps> = ({
15 children,
16 className = '',
17 timestamp,
18 ...props
19 }: NotificationDrawerListItemBodyProps) => (
20 <Fragment>
21 <div {...props} className={css(styles.notificationDrawerListItemDescription, className)}>
22 {children}
23 </div>
24 {timestamp && <div className={css(styles.notificationDrawerListItemTimestamp, className)}>{timestamp}</div>}
25 </Fragment>
26 );
27 NotificationDrawerListItemBody.displayName = 'NotificationDrawerListItemBody';