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/Dropdown/dropdown';
|
5 | import CaretDownIcon from '@patternfly/react-icons/dist/esm/icons/caret-down-icon';
|
6 | import { Toggle } from './Toggle';
|
7 | import { Badge } from '../Badge';
|
8 | export const BadgeToggle = (_a) => {
|
9 | var { id = '', children = null, badgeProps = { isRead: true }, className = '', isOpen = false, 'aria-label': ariaLabel = 'Actions', parentRef = null, getMenuRef = null, isActive = false, isPlain = null, isDisabled = false, bubbleEvent = false, onToggle = () => undefined,
|
10 |
|
11 | ref } = _a,
|
12 | props = __rest(_a, ["id", "children", "badgeProps", "className", "isOpen", 'aria-label', "parentRef", "getMenuRef", "isActive", "isPlain", "isDisabled", "bubbleEvent", "onToggle", "ref"]);
|
13 | return (React.createElement(Toggle, Object.assign({ id: id, className: className, isOpen: isOpen, "aria-label": ariaLabel, parentRef: parentRef, getMenuRef: getMenuRef, isActive: isActive, isPlain: isPlain || true, isDisabled: isDisabled, onToggle: onToggle, bubbleEvent: bubbleEvent }, props),
|
14 | React.createElement(Badge, Object.assign({}, badgeProps),
|
15 | children,
|
16 | React.createElement("span", { className: css(styles.dropdownToggleIcon) },
|
17 | React.createElement(CaretDownIcon, null)))));
|
18 | };
|
19 | BadgeToggle.displayName = 'BadgeToggle';
|
20 |
|
\ | No newline at end of file |