@bdt-component-library/input-tile
v0.1.4
Published
InputTile component
Downloads
8
Readme
InputTile 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 checkbox and radio tiles according to style guide conventions.
- https://zeroheight.com/990ea04ab/p/78ca74-controls/t/57c5d2
- https://zeroheight.com/990ea04ab/p/78ca74-controls/t/889223
API
| prop | type | required | default | explanation | |-----------|--------|----------|---------|--------------| | className | string | no | "" | Adds an optional classname to the component | | children | any | yes | n/a | The inner content of the component | | disabled | boolean | no | false | Determines input disabled state | | checked | boolean | yes | false | Determines input checked state | | hasError | boolean | no | false | Determines if the radio is in an error state | | role | string | yes | "" | The role attribute for the input tile | | autoWidth | boolean | no | false | Sets tile's width as the tile's contents plus default padding | | onClick | function(e: event) | no | () => {} | Event handler for onclick event on the radio input |