1.0.3 • Published 11 months ago

@will01/button v1.0.3

Weekly downloads
-
License
-
Repository
-
Last release
11 months ago

@will01/button

A simple and reusable button component for React.

Installation

npm install @will01/button

Usage

import React from 'react';
import Button from '@will01/button';

const App = () => {
  const handleClick = () => {
    alert('Button clicked!');
  };

  return (
    <div>
      <Button label="Click Me" onClick={handleClick} />
    </div>
  );
};

export default App;

Props

PropTypeDescription
labelstringThe text to display on the button.
onClick() => voidThe function to call when the button is clicked.

Example

import React from 'react';
import Button from '@will01/button';

const App = () => {
  const handleClick = () => {
    alert('Button clicked!');
  };

  return (
    <div>
      <Button label="Click Me" onClick={handleClick} />
    </div>
  );
};

export default App;

License

MIT License

1.0.2

11 months ago

1.0.3

11 months ago

1.0.1

1 year ago

1.0.0

1 year ago