UNPKG

dash-core-components

Version:

Core component suite for Dash

80 lines (76 loc) 3.13 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _react = _interopRequireWildcard(require("react")); var _propTypes = _interopRequireDefault(require("prop-types")); function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } /** * Part of dcc.Tabs - this is the child Tab component used to render a tabbed page. * Its children will be set as the content of that tab, which if clicked will become visible. */ /* eslint-disable no-unused-vars */ var Tab = _ref => { var children = _ref.children, _ref$disabled = _ref.disabled, disabled = _ref$disabled === void 0 ? false : _ref$disabled, _ref$disabled_style = _ref.disabled_style, disabled_style = _ref$disabled_style === void 0 ? { color: '#d6d6d6' } : _ref$disabled_style; return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, children); }; /* eslint-enable no-unused-vars */ // Default props are defined above for proper docstring generation in React 18. // The actual default values are set in Tabs.react.js. Tab.propTypes = { /** * The ID of this component, used to identify dash components * in callbacks. The ID needs to be unique across all of the * components in an app. */ id: _propTypes.default.string, /** * The tab's label */ label: _propTypes.default.string, /** * The content of the tab - will only be displayed if this tab is selected */ children: _propTypes.default.node, /** * Value for determining which Tab is currently selected */ value: _propTypes.default.string, /** * Determines if tab is disabled or not - defaults to false */ disabled: _propTypes.default.bool, /** * Overrides the default (inline) styles when disabled */ disabled_style: _propTypes.default.object, /** * Appends a class to the Tab component when it is disabled. */ disabled_className: _propTypes.default.string, /** * Appends a class to the Tab component. */ className: _propTypes.default.string, /** * Appends a class to the Tab component when it is selected. */ selected_className: _propTypes.default.string, /** * Overrides the default (inline) styles for the Tab component. */ style: _propTypes.default.object, /** * Overrides the default (inline) styles for the Tab component when it is selected. */ selected_style: _propTypes.default.object }; var _default = exports.default = Tab;