@devdynamo/ui-components
v1.2.0
Published
A collection of reusable UI components for React.
Downloads
14
Maintainers
Readme
UI Components Library
This package provides reusable React UI components, starting with a versatile button component. More components may be added in the future.
🚀 Features
- Button Component:
- 5 Variants:
primary,secondary,success,danger,warning - 3 Sizes:
small,medium,large - Customizable Props:
label,onClick,size,variant,disabled - Disabled State: Opacity is reduced when the button is disabled
- 5 Variants:
📦 Installation
npm install your-package-name🛠 Usage
import Button from "your-package-name";
<Button label="Primary Button" variant="primary" onClick={() => alert("Clicked!")} />
<Button label="Danger Button" variant="danger" size="large" />
<Button label="Success" variant="success" size="small" disabled />📌 Props
| Prop | Type | Default | Description |
|------------|------------|------------|------------|
| label | string | Required | Button text |
| onClick | function | null | Click event handler |
| variant | string | primary | Button style (primary, secondary, success, danger, warning) |
| size | string | medium | Button size (small, medium, large) |
| disabled | boolean | false | Disables the button |
📝 License
This project is licensed under the MIT License.
