UNPKG

@ntragas/pouncejstest

Version:

A collection of UI components from Panther labs

23 lines (22 loc) 985 B
import _extends from "@babel/runtime/helpers/extends"; import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose"; import { forwardRefWithAs } from '@reach/utils'; import { MenuItem as ReachMenuItem } from '@reach/menu-button'; import MenuItem from '../utils/MenuItem/MenuItem'; import React from 'react'; // this is not a typo, it's intentional export var DropdownItem = forwardRefWithAs(function DropdownItem(_ref, ref) { var children = _ref.children, _ref$onSelect = _ref.onSelect, onSelect = _ref$onSelect === void 0 ? function () {} : _ref$onSelect, disabled = _ref.disabled, rest = _objectWithoutPropertiesLoose(_ref, ["children", "onSelect", "disabled"]); return /*#__PURE__*/React.createElement(ReachMenuItem, _extends({ disabled: disabled, onSelect: onSelect, ref: ref }, rest), /*#__PURE__*/React.createElement(MenuItem, { disabled: disabled }, children)); }); export default DropdownItem;