UNPKG

1.28 kBJavaScriptView Raw
1import PropTypes from 'prop-types';
2import * as React from 'react';
3import TabContainer from './TabContainer';
4import TabContent from './TabContent';
5import TabPane from './TabPane';
6import { Fragment as _Fragment } from "react/jsx-runtime";
7import { jsx as _jsx } from "react/jsx-runtime";
8
9/* eslint-disable react/no-unused-prop-types */
10const propTypes = {
11 eventKey: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
12
13 /**
14 * Content for the tab title.
15 */
16 title: PropTypes.node.isRequired,
17
18 /**
19 * The disabled state of the tab.
20 */
21 disabled: PropTypes.bool,
22
23 /**
24 * Class to pass to the underlying nav link.
25 */
26 tabClassName: PropTypes.string,
27
28 /**
29 * Object containing attributes to pass to underlying nav link.
30 */
31 tabAttrs: PropTypes.object
32};
33
34const Tab = () => {
35 throw new Error('ReactBootstrap: The `Tab` component is not meant to be rendered! ' + "It's an abstract component that is only valid as a direct Child of the `Tabs` Component. " + 'For custom tabs components use TabPane and TabsContainer directly'); // Needed otherwise docs error out.
36
37 return /*#__PURE__*/_jsx(_Fragment, {});
38};
39
40Tab.propTypes = propTypes;
41export default Object.assign(Tab, {
42 Container: TabContainer,
43 Content: TabContent,
44 Pane: TabPane
45});
\No newline at end of file