1 | import { __rest } from "tslib";
|
2 | import * as React from 'react';
|
3 | import { InternalDropdownItem } from './InternalDropdownItem';
|
4 | import { DropdownArrowContext } from './dropdownConstants';
|
5 | import { useOUIAProps } from '../../helpers';
|
6 | export const DropdownItem = (_a) => {
|
7 | var { children, className, component = 'a', isDisabled = false, isAriaDisabled = false, isPlainText = false, isHovered = false, href, tooltip, tooltipProps = {}, listItemClassName, onClick,
|
8 |
|
9 | ref,
|
10 | additionalChild, customChild, tabIndex = -1, icon = null, autoFocus, description = null, styleChildren, ouiaId, ouiaSafe } = _a, props = __rest(_a, ["children", "className", "component", "isDisabled", "isAriaDisabled", "isPlainText", "isHovered", "href", "tooltip", "tooltipProps", "listItemClassName", "onClick", "ref", "additionalChild", "customChild", "tabIndex", "icon", "autoFocus", "description", "styleChildren", "ouiaId", "ouiaSafe"]);
|
11 | const ouiaProps = useOUIAProps(DropdownItem.displayName, ouiaId, ouiaSafe);
|
12 | return (React.createElement(DropdownArrowContext.Consumer, null, context => (React.createElement(InternalDropdownItem, Object.assign({ context: context, role: "menuitem", tabIndex: tabIndex, className: className, component: component, isDisabled: isDisabled, isAriaDisabled: isAriaDisabled, isPlainText: isPlainText, isHovered: isHovered, href: href, tooltip: tooltip, tooltipProps: tooltipProps, listItemClassName: listItemClassName, onClick: onClick, additionalChild: additionalChild, customChild: customChild, icon: icon, autoFocus: autoFocus, styleChildren: styleChildren, description: description }, ouiaProps, props), children))));
|
13 | };
|
14 | DropdownItem.displayName = 'DropdownItem';
|
15 |
|
\ | No newline at end of file |