buttongroup-library

1.0.18 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i buttongroup-library

Weekly Downloads

0

Version

1.0.18

License

ISC

Unpacked Size

7.25 kB

Total Files

10

Last publish

Collaborators

  • archana0405