UNPKG

@carbon/react

Version:

React components for the Carbon Design System

50 lines (46 loc) 1.73 kB
/** * Copyright IBM Corp. 2016, 2023 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js'; import PropTypes from 'prop-types'; import React from 'react'; import cx from 'classnames'; import { usePrefix } from '../../internal/usePrefix.js'; var _span, _Tab, _Tab2, _Tab3, _Tab4, _Tab5; function Tab() { const prefix = usePrefix(); return /*#__PURE__*/React.createElement("li", { className: `${prefix}--tabs__nav-item` }, /*#__PURE__*/React.createElement("div", { className: `${prefix}--tabs__nav-link` }, _span || (_span = /*#__PURE__*/React.createElement("span", null)))); } function TabsSkeleton({ className, contained, ...rest }) { const prefix = usePrefix(); const tabClasses = cx(className, `${prefix}--tabs`, `${prefix}--skeleton`, { [`${prefix}--tabs--contained`]: contained }); return /*#__PURE__*/React.createElement("div", _extends({ className: tabClasses }, rest), /*#__PURE__*/React.createElement("ul", { className: `${prefix}--tabs__nav` }, _Tab || (_Tab = /*#__PURE__*/React.createElement(Tab, null)), _Tab2 || (_Tab2 = /*#__PURE__*/React.createElement(Tab, null)), _Tab3 || (_Tab3 = /*#__PURE__*/React.createElement(Tab, null)), _Tab4 || (_Tab4 = /*#__PURE__*/React.createElement(Tab, null)), _Tab5 || (_Tab5 = /*#__PURE__*/React.createElement(Tab, null)))); } TabsSkeleton.propTypes = { /** * Specify an optional className to add. */ className: PropTypes.string, /** * Provide the type of Tab */ contained: PropTypes.bool }; export { TabsSkeleton, TabsSkeleton as default };