0.4.7 • Published 4 years ago
@bdt-component-library/tab v0.4.7
Tab Component
About
This is a component published as its own package from our component library monorepo: https://github.com/BenefitsDataTrust/ui-components. Setup instructions, as well as higher-level goals and concerns can be found from the main project README.
Description
Handles display of an individual tab according to style guide conventions.
API
| prop | type | required | default | explanation |
|---|---|---|---|---|
| children | React node | yes | n/a | The inner content of the Tab |
| className | string | no | n/a | Adds an optional classname to the component |
| size | enum("default", "compact") | no | "default" | Determines the size variant |
| fullWidth | boolean | no | false | Determines if the tabs are full width |
| isActive | boolean | no | false | Determines if tab should receive active styles |
| onClick | function | no | undefined | Event handler for onClick events |
| leadingIcon | React element OR false | no | false | Set leading tab icon |