customize-button
v1.0.13
Published
Different variations of buttons with custom button components like 1. Primary 2. Secondary 3. Success 4. Warning 5. Danger
Downloads
10
Maintainers
Readme
Custom Button Component
A versatile React component to render buttons with multiple variations such as primary, secondary, success, warning, danger, outline, and rounded.
Installation:
npm i customize-button
Props
primary, secondary, success, warning, danger, outline, rounded: (Boolean) - Toggle different button variations.
Note:
Only one of these props should be set to true at a time. If multiple variations are provided simultaneously, an error will be thrown in the console.
Error Handling
This Custom Button component utilizes prop validation to ensure that only one variation can be applied at a time. If more than one variation is selected simultaneously (true), an error will be logged in the console: