1.2.5 • Published 7 months ago
@shahrozfreelancer/basicbutton v1.2.5
BasicButton
BasicButton is a simple React button component that allows you to quickly add customizable buttons to your React projects.
Installation
Install the package via npm:
npm install @shahrozfreelancer/basicbutton
Usage
Here's a basic example of how to use the BasicButton
component in your project:
import React from 'react';
import Button from '@shahrozfreelancer/basicbutton';
function App() {
return (
<div>
<h1>Welcome to BasicButton!</h1>
<Button
label="Click Me!"
onClick={() => console.log('Button Clicked!')}
/>
</div>
);
}
export default App;
Props
The BasicButton
component accepts the following props:
Prop Name | Type | Default | Description |
---|---|---|---|
label | string | "Button" | The text displayed on the button. |
onClick | func | () => {} | Function to be executed on button click. |
Features
- Customizable label text
- Easy-to-use click handler
Development
Building the Package Locally
If you want to test or modify this package locally:
- Clone the repository:
git clone <repository-url>
cd basicbutton
- Install dependencies and build:
npm install
npm run build
License
MIT License. See the LICENSE file for details.