This component use compound components concept to create a simple tabs component
npm install @feuer/react-tabs
yarn add @feuer/react-tabs
`$3
`
npm install @feuer/react-tabs
`This package also depends on
react, tslib only esm for umd its already included, react-dom, prop-types. Please make sure you have it installed as well.Usage
$3
`jsx
import React from "react";
import { Tabs } from "@feuer/react-tabs";const styles = {
fontFamily: "sans-serif",
textAlign: "center"
};
const LeftTabs = () => (
activeTab={{
id: "tab1"
}}
>
This is tab 1
This is tab 2
);
`Basic Props
This is the list of props that you should probably know about when using react-tabs.$3
`javascript
Tabs.propTypes = {
activeTab: {
id: PropTypes.string.isRequired,
},
children: PropTypes.arrayOf(PropTypes.node).isRequired,
tabsProps: {
style: PropTypes.object,
className: PropTypes.string
}
};
`$3
`javascript
Tab.propTypes = {
id: PropTypes.string.isRequired,
title: PropTypes.string.isRequired,
tabIndex: PropTypes.oneOf([PropTypes.string, PropTypes.number])
};
``Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
We use SemVer for versioning. For the versions available, see the tags on this repository.
* Yazan Aabed
* See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE.md file for details