neat-react-button is a button component that makes button creation a breeze
yarn add neat-react-button
or
npm install neat-react-button
Implemented as a handy tool and any pull requests welcomed!
Import neat-react-button
in your React component:
import Button from 'neat-react-button'
there are currenctly four colors optional, primary(blue) the default one, success(green), info(white whith black font), and danger(red)
There are currently three sizes optional, sm, md(default) and lg.
The button becomes anchor if there is a link existing. Otherwise a button.
Prop | Type | Default | Description |
---|---|---|---|
size | string | md | Button size |
color | string | primary | colors described by keywords |
element | string | button | Type of element |
text | string | default text | The buttons's text |
disabled | bool | false | to disable button |
debounce | number | 0 | Interrupts button click in ms |
onClick | function | ()=>{} | fired after click |
btntype | string array | button | button, submit, reset |
You can find example of usage in the demo directory, which you can run in a local development server using npm start or yarn run start