custom-button-libtestingforus
v1.0.1
Published
A customizable React button library with multiple variants and sizes
Maintainers
Readme
Custom Button Library
A modern, customizable React button library with multiple variants and sizes.
Installation
npm install custom-button-lib
Usage
import { Button } from 'custom-button-lib';
function App() {
return (
<div>
{/* Primary Button */}
<Button variant="primary" size="medium" onClick={() => console.log('Clicked!')}>
Click Me
</Button>
{/* Secondary Button */}
<Button variant="secondary" size="small">
Secondary
</Button>
{/* Outline Button */}
<Button variant="outline" size="large" disabled>
Disabled
</Button>
</div>
);
}
Props
| Prop | Type | Default | Description | |------|------|---------|-------------| | variant | 'primary' | 'secondary' | 'outline' | 'primary' | The style variant of the button | | size | 'small' | 'medium' | 'large' | 'medium' | The size of the button | | disabled | boolean | false | Whether the button is disabled | | onClick | function | undefined | Click handler function | | className | string | '' | Additional CSS class names |
License
MIT