Debian Codegraph @

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

raw
1 import { forwardRef } from 'react';
2 import styles from '@patternfly/react-styles/css/components/NotificationDrawer/notification-drawer';
3 import { css } from '@patternfly/react-styles';
4
5 export interface NotificationDrawerProps extends React.HTMLProps<HTMLDivElement> {
6 /** Content rendered inside the notification drawer */
7 children?: React.ReactNode;
8 /** Additional classes added to the notification drawer */
9 className?: string;
10 /** @hide Forwarded ref */
11 innerRef?: React.Ref<any>;
12 }
13
14 const NotificationDrawerBase: React.FunctionComponent<NotificationDrawerProps> = ({
15 children,
16 className = '',
17 innerRef,
18 ...props
19 }: NotificationDrawerProps) => (
20 <div ref={innerRef} {...props} className={css(styles.notificationDrawer, className)}>
21 {children}
22 </div>
23 );
24 export const NotificationDrawer = forwardRef((props: NotificationDrawerProps, ref: React.Ref<any>) => (
25 <NotificationDrawerBase innerRef={ref} {...props} />
26 ));
27 NotificationDrawer.displayName = 'NotificationDrawer';