button-knighthunt

1.0.1 • Public • Published

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 to true 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.

Package Sidebar

Install

npm i button-knighthunt

Weekly Downloads

0

Version

1.0.1

License

ISC

Unpacked Size

4.8 kB

Total Files

5

Last publish

Collaborators

  • jasim0021