0.26.1 • Published 1 month ago

@bolttech/atoms-button v0.26.1

Weekly downloads
-
License
-
Repository
-
Last release
1 month ago

Button Component

A customizable React button component.

Installation

Use the package manager npm or yarn to install the component.

npm install @bolttech/frontend-foundations @bolttech/atoms-button

or

yarn add @bolttech/frontend-foundations @bolttech/atoms-button

Props

The Button component accepts the following properties:

PropTypeDescription
dataTestIdstringThe data-testid attribute for testing.
disabledbooleanDisables the button when set to true.
titlestringThe text content of the button.
variantstringThe variant style of the button (e.g., 'primary', 'secondary', 'alternative').
sizestringThe size of the button (e.g., 'sm', 'md', 'lg').
iconRightstringThe name of the icon to be displayed on the right side of the button.
iconLeftstringThe name of the icon to be displayed on the left side of the button.
fullWidthbooleanSets the button width to 100% if true.
typestringThe type of the button (e.g., 'button', 'submit', 'reset').
onClickfunctionCallback function to handle the button click event.

Usage

import React from 'react';
import {Button} from '@bolttech/atoms-button';
import {bolttechTheme, BolttechThemeProvider} from "@bolttech/frontend-foundations";

const ExampleComponent = () => {
  const handleButtonClick = () => {
    // Logic to handle the button click event
  };

  return (
    <BolttechThemeProvider theme={bolttechTheme}>
      <Button
        dataTestId="custom-button"
        disabled={false}
        title="Click Me"
        variant="primary"
        size="md"
        iconRight="arrow_forward"
        fullWidth={false}
        type="button"
        onClick={handleButtonClick}
      />
    </BolttechThemeProvider>
  );
};

export default ExampleComponent;

Contributing

Contributions are welcome! For any bug fixes, improvements, or new features, please open an issue or submit a pull request.

Please make sure to follow the code standards and test your changes before submitting.

0.26.1

1 month ago

0.25.2

2 months ago

0.25.1

2 months ago

0.25.0

2 months ago

0.24.4

3 months ago

0.24.3

3 months ago

0.24.2

3 months ago

0.24.1

3 months ago

0.24.0

3 months ago

0.23.2

4 months ago

0.23.1

4 months ago

0.23.0

4 months ago

0.22.2

5 months ago

0.22.1

6 months ago

0.20.0

8 months ago

0.19.0

8 months ago

0.19.1

8 months ago

0.19.2

8 months ago

0.19.3

8 months ago

0.19.4

8 months ago

0.11.0

9 months ago

0.13.0

9 months ago

0.15.0

9 months ago

0.17.0

8 months ago

0.21.2

6 months ago

0.21.1

6 months ago

0.9.0

10 months ago

0.5.0

10 months ago

0.7.0

10 months ago

0.21.0

6 months ago

0.10.1

10 months ago

0.12.0

9 months ago

0.10.2

10 months ago

0.14.0

9 months ago

0.16.0

9 months ago

0.18.0

8 months ago

0.10.0

10 months ago

0.0.1

10 months ago

0.22.0

6 months ago

0.8.0

10 months ago

0.4.1

10 months ago

0.6.0

10 months ago

0.4.0

11 months ago

0.3.1

11 months ago

0.2.14

11 months ago

0.2.13

12 months ago

0.2.12

12 months ago

0.3.0

12 months ago

0.2.11

1 year ago

0.2.10

1 year ago

0.2.7

1 year ago

0.2.6

1 year ago

0.2.9

1 year ago

0.2.8

1 year ago

0.2.5

1 year ago

0.2.4

1 year ago

0.2.3

1 year ago

0.2.2

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago

0.1.3

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago