1.0.1 • Published 4 years ago

gb-react-loaderbutton v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

LoaderButton

Button React component with a loader. Requires Tailwind CSS

Install

yarn add gb-react-loaderbutton

Example usage

import LoaderButton from 'gb-react-loader-button'

export default () => (
  <LoaderButton onClick={() => {
    alert('Hello')
  }}>Text</LoaderButton>
)

Reference

onClick

Function to be executed on button click, like the default HTML onClick handler

isLoading

If true, shows a loader and disables the button

disabled

If true, disables the button

type

Button type. For example, you can use type="submit" if you'd like to use the loader button as a submit button in a HTML form