sim-component
v1.1.0
Published
Demo for npm library
Downloads
213
Maintainers
Readme
Sim Component Library
A customizable button component for React applications.
Installation
To install the library, run the following command:
npm install sim-component
Usage
Import the Button
component and use it in your React application:
import React from "react";
import { Button } from "sim-component";
const App = () => {
return (
<div>
<Button>Click me!</Button>
</div>
);
};
Props
The Button
component accepts the following props:
type
: The type of button (primary or secondary). Defaults toprimary
.textColor
: The color of the button text.size
: The size of the button (small, medium, or large). Defaults tomedium
.onClick
: The function to call when the button is clicked.children
: The content of the button.
Examples
Primary Button
<Button type="primary">Primary Button</Button>
Secondary Button
<Button type="secondary">Secondary Button</Button>
Small Button
<Button size="small">Small Button</Button>
Large Button
<Button size="large">Large Button</Button>
Button with Custom Text Color
<Button textColor="#fff">Button with Custom Text Color</Button>
Button with Custom onClick Handler
<Button onClick={() => console.log("Button clicked!")}>
Button with Custom onClick Handler
</Button>
Contributing
Contributions are welcome! Please submit a pull request with your changes.
License
Sim Component Library is licensed under the MIT License.