1.0.1 • Published 7 years ago
@fenderdigital/react-loading-spinner-button v1.0.1
LoadingSpinnerButton for Fender React UI Kit
Description
A button component which has a spinner for a loading state.
Installation and Usage
yarn add @fenderdigital/react-loading-spinner-button --saveimport LoadingSpinnerButton from '@fenderdigital/react-loading-spinner-button';Props
children- renders any child elements, usually the button textcolor- color of the buttondataId- data id value, mainly for testingdisabled- option to disable the buttonfontStyles- styles for button textloading- bool for whether or not the button is loadingonClick- handler for when the button is clickedrequireClick- Iftrue, require both a click andloading={true}before the button starts spinning.spinnerColor- color of the loading spinnerspinnerWidth- width of the loading spinner for different size buttonsstyles- styles for the button itselftype- button type.
| propName | propType | defaultValue | isRequired | 
|---|---|---|---|
| children | node | - | yes | 
| color | string | red | no | 
| dataId | string | '' | no | 
| disabled | bool | false | no | 
| fontStyles | string | '' | no | 
| loading | bool | false | yes | 
| onClick | func | false | no | 
| requireClick | boolean | false | no | 
| spinnerColor | string | white | no | 
| spinnerWidth | number | 15 | no | 
| styles | string | '' | no | 
| type | string | 'button' | no | 
Development
Check the Monorepo README for development documentation.