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 | import TimesIcon from '@patternfly/react-icons/dist/esm/icons/times-icon';
|
6 | import { Text, TextVariants } from '../Text';
|
7 | import { Button, ButtonVariant } from '../Button';
|
8 | export const NotificationDrawerHeader = (_a) => {
|
9 | var { children, className = '', count, closeButtonAriaLabel = 'Close', customText, onClose, title = 'Notifications', unreadText = 'unread' } = _a, props = __rest(_a, ["children", "className", "count", "closeButtonAriaLabel", "customText", "onClose", "title", "unreadText"]);
|
10 | return (React.createElement("div", Object.assign({}, props, { className: css(styles.notificationDrawerHeader, className) }),
|
11 | React.createElement(Text, { component: TextVariants.h1, className: css(styles.notificationDrawerHeaderTitle) }, title),
|
12 | (customText !== undefined || count !== undefined) && (React.createElement("span", { className: css(styles.notificationDrawerHeaderStatus) }, customText || `${count} ${unreadText}`)),
|
13 | (children || onClose) && (React.createElement("div", { className: css(styles.notificationDrawerHeaderAction) },
|
14 | children,
|
15 | onClose && (React.createElement("div", null,
|
16 | React.createElement(Button, { variant: ButtonVariant.plain, "aria-label": closeButtonAriaLabel, onClick: onClose },
|
17 | React.createElement(TimesIcon, { "aria-hidden": "true" }))))))));
|
18 | };
|
19 | NotificationDrawerHeader.displayName = 'NotificationDrawerHeader';
|
20 |
|
\ | No newline at end of file |