gb-react-loaderbutton

1.0.1 • Public • Published

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

/gb-react-loaderbutton/

    Package Sidebar

    Install

    npm i gb-react-loaderbutton

    Weekly Downloads

    5

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    3.31 kB

    Total Files

    4

    Last publish

    Collaborators

    • georgenet