1.0.1 • Published 5 years ago

@fenderdigital/react-loading-spinner-button v1.0.1

Weekly downloads
1
License
UNLICENSED
Repository
-
Last release
5 years ago

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 --save
import LoadingSpinnerButton from '@fenderdigital/react-loading-spinner-button';

Props

  • children - renders any child elements, usually the button text
  • color - color of the button
  • dataId - data id value, mainly for testing
  • disabled - option to disable the button
  • fontStyles - styles for button text
  • loading - bool for whether or not the button is loading
  • onClick - handler for when the button is clicked
  • requireClick - If true, require both a click and loading={true} before the button starts spinning.
  • spinnerColor - color of the loading spinner
  • spinnerWidth - width of the loading spinner for different size buttons
  • styles - styles for the button itself
  • type - button type.
propNamepropTypedefaultValueisRequired
childrennode-yes
colorstringredno
dataIdstring''no
disabledboolfalseno
fontStylesstring''no
loadingboolfalseyes
onClickfuncfalseno
requireClickbooleanfalseno
spinnerColorstringwhiteno
spinnerWidthnumber15no
stylesstring''no
typestring'button'no

Development

Check the Monorepo README for development documentation.