UNPKG

@ntragas/pouncejstest

Version:

A collection of UI components from Panther labs

23 lines (22 loc) 842 B
import _extends from "@babel/runtime/helpers/extends"; import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose"; import React from 'react'; import { Tab as ReachTab } from '@reach/tabs'; import AbstractButton from '../AbstractButton'; var Tab = /*#__PURE__*/React.forwardRef(function Tab(_ref, ref) { var children = _ref.children, isSelected = _ref.isSelected, isFocused = _ref.isFocused, rest = _objectWithoutPropertiesLoose(_ref, ["children", "isSelected", "isFocused"]); // @ts-ignore var content = typeof children === 'function' ? children({ isSelected, isFocused }) : children; return /*#__PURE__*/React.createElement(ReachTab, _extends({ ref: ref, as: AbstractButton, zIndex: 1 }, rest), content); }); export default /*#__PURE__*/React.memo(Tab);