1 | import { __rest } from "tslib";
|
2 | import * as React from 'react';
|
3 | import { css } from '@patternfly/react-styles';
|
4 | import styles from '@patternfly/react-styles/css/components/NotificationDrawer/notification-drawer';
|
5 | export const NotificationDrawerListItem = (_a) => {
|
6 | var { children = null, className = '', isHoverable = true, isRead = false,
|
7 |
|
8 | onClick = (event) => undefined, tabIndex = 0, variant = 'default' } = _a, props = __rest(_a, ["children", "className", "isHoverable", "isRead", "onClick", "tabIndex", "variant"]);
|
9 | const onKeyDown = (event) => {
|
10 |
|
11 | if (event.key === 'Enter' || event.key === ' ') {
|
12 | event.target.click();
|
13 | }
|
14 | };
|
15 | return (React.createElement("li", Object.assign({}, props, { className: css(styles.notificationDrawerListItem, isHoverable && styles.modifiers.hoverable, styles.modifiers[variant], isRead && styles.modifiers.read, className), tabIndex: tabIndex, onClick: e => onClick(e), onKeyDown: onKeyDown }), children));
|
16 | };
|
17 | NotificationDrawerListItem.displayName = 'NotificationDrawerListItem';
|
18 |
|
\ | No newline at end of file |