custom-react-button

0.0.4 • Public • Published

simple-react-button

A beautiful and simple button component

Installation

npm install --save simple-react-button

Usage

import Button from 'simple-react-button';
// then in your render function
render() {
    return(
        <div>
            <Button color="#9b59b6" full style={{fontSize: '13px'}}>
                Click Me
            </Button>
        </div>
    );
}
// And that's all for now

Props

style

You can provide your own inline custom style to Button.

<Button style={{fontSize: '13px'}}>
    Click Me
</Button>

full

If button will be a full button .. or a hollow button .. you have to try it out yourself.

<Button full>
    Click Me
</Button>

color

Default color of the button ...

<Button color="#9b59b6" full>
    Click Me
</Button>

round

Render a rounded button

<Button color="#9b59b6" round>
    Click Me
</Button>

onClick

You can easily call any function on Click.

<Button color="#9b59b6" full onClick={() => {console.log('Hey I Worked')}}>
    Click Me
</Button>

About Me

Package Sidebar

Install

npm i custom-react-button

Weekly Downloads

1

Version

0.0.4

License

MIT

Last publish

Collaborators

  • manojsinghnegi