1.0.18 • Published 2 years ago

buttongroup-library v1.0.18

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

Button Group Library

Description

The Button Group Library is a React component that allows users to create a group of buttons with customizable styles, including rounded corners and an active state.

Installation

To install the Button Group Library, use npm or yarn:

npm install buttongroup-library

or

yarn add buttongroup-library

Usage

To use the TextButton component, import it into your React application: 1. import {TextButton} from 'buttongroup-library'; 2. Create an array of buttons with the required properties: const buttons = { id: 1, label: 'Button 1' }, { id: 2, label: 'Button 2' }, ; 3. Render the TextButton component in your JSX, passing the necessary props:

Props TextButton Component buttons (Array): An array of objects representing each button with properties id and label. isRounded (Boolean): Specifies whether the buttons should have rounded corners. active (Number): The ID of the currently active button. onButtonClick (Function): A function to handle button clicks.

Customization The TextButton component supports customization using CSS and the following props:

buttons: Array of button objects isRounded: Boolean to set rounded or square corners for buttons active: ID of the currently active button

@babel/cli, @babel/core, @babel/preset-env, @babel/preset-react, babel-loader: Babel dependencies for transpiling. css-loader, style-loader: Loaders for handling CSS files. react: React library. webpack, webpack-cli: Bundling and build tools

1.0.18

2 years ago

1.0.17

2 years ago

1.0.16

2 years ago

1.0.15

2 years ago

1.0.14

2 years ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.10

2 years ago

1.0.8

2 years ago

1.0.6

2 years ago

1.0.4

2 years ago