1.0.1 • Published 2 years ago
button-knighthunt v1.0.1
Custom Button Component
A simple React component for creating customizable buttons.
Installation
npm install my-custom-buttonUsage
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 totruefor 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.