1.0.12 • Published 7 years ago
@crpt/react-tabs v1.0.12
react-tabs
Tabs component.
Usage
import { Tabs } from "@crpt/react-tabs";
<Tabs tabs={[{id: 1, title: "Tab 1"}, {id: 2, title: "Tab 2"}]} selectedId={2} onSelect{val => console.log(val)} />| PropName | Description | Example |
|---|---|---|
| tabs: Array (Required) | Tabs configuration. | <Tabs tabs={{id: 1, title: "Tab 1"}, {id: 2, title: "Tab 2"}} /> |
| selectedId: Number | ID of selected tab. | <Tabs tabs={{id: 1, title: "Tab 1"}, {id: 2, title: "Tab 2"}} selectedId={2} /> |
| onSelect: Function | Callback for tab select event. | <Tabs tabs={{id: 1, title: "Tab 1"}, {id: 2, title: "Tab 2"}} onSelect{val => console.log(val)} /> |
| fillWidth: Boolean | Fills width of container. |


