0.0.1 • Published 10 months ago

@farooq0373/reactbutton v0.0.1

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

reactbutton

A simple and customizable React button component using styled-components.

Installation

You can install the package using npm or yarn:

npm install @farooq0373/reactbutton

or

yarn add @farooq0373/reactbutton

Usage

Import and use the Button component in your React project:

import React from "react";
import Button from "@farooq0373/reactbutton";

const App = () => {
  return (
    <div>
      <Button variant="primary">Primary Button</Button>
      <Button variant="secondary">Secondary Button</Button>
    </div>
  );
};

export default App;

Props

Prop NameTypeDefaultDescription
variant"primary" | "secondary""primary"Defines the button style (primary or secondary)
childrenReact.ReactNode-The content inside the button
...propsButtonHTMLAttributes-All default button attributes

Styling

The button uses styled-components, and the styles can be customized as needed.

  • Primary Button: Blue (#007bff)
  • Secondary Button: Gray (#6c757d)

License

This project is licensed under the MIT License.


Happy Coding! 🚀