Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@bolttech/atoms-button

Package Overview
Dependencies
Maintainers
0
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bolttech/atoms-button

A customizable React button component.

  • 0.24.5
  • npm
  • Socket score

Version published
Weekly downloads
1.1K
decreased by-38.9%
Maintainers
0
Weekly downloads
 
Created
Source

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.

FAQs

Package last updated on 02 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc