button-knighthunt
v1.0.1
Published
A simple React component for creating customizable buttons.
Downloads
2
Maintainers
Readme
Custom Button Component
A simple React component for creating customizable buttons.
Installation
npm install my-custom-button
Usage
import React from 'react';
import Button from 'my-custom-button';
const MyComponent = () => {
return (
<div>
<Button primary onClick={() => console.log('Primary button clicked')}>
Primary Button
</Button>
<Button onClick={() => console.log('Secondary button clicked')}>
Secondary Button
</Button>
</div>
);
};
export default MyComponent;
Props
primary
(optional): Set totrue
for a primary button with a blue background.onClick
(optional): Callback function to be executed when the button is clicked.
Styles
The button has a default style, but you can customize it further by passing additional styles or modifying the existing ones.
License
This project is licensed under the ISC License.