mr-generic-button
v1.0.12
Published
It is a button component created usin antd library for product
Downloads
2
Readme
Mr Generic Button
A customizable button component for React applications.
Table of Contents
Installation
Install the package via npm:
npm install --save-dev mr-generic-button
Usage
import Button from 'mr-generic-button';
const myFunction = () => {
return(
<>
<Button
label="My Button"
type="Primary"
handleClick={console.log("Ok")}
/>
</>
)
}
Props
Install the package via npm:
| Property | Description | Type | Default |
|-----------|---------------------------------------------------------------|--------------|---------|
| block | Option to fit button width to its parent width | boolean | false |
| danger | Set the danger status of button | boolean | false |
| disabled | Disabled state of button | boolean | false |
| ghost | Make background transparent and invert text and border colors | boolean | false |
| href | Redirect URL of link button | string | - |
| htmlType | Set the original HTML type of button | string | button |
| icon | Set the icon component of button | ReactNode | - |
| loading | Set the loading status of button | boolean | false |
| shape | Can be set button shape | default, circle, round | default |
| size | Set the size of button | large, middle, small | middle |