0.20.0 • Published 10 months ago

@bolttech/atoms-backdrop v0.20.0

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

Backdrop Component

A React component that provides a backdrop for overlay content.

Installation

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

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

or

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

Props

The Backdrop component accepts the following properties:

PropTypeDescription
idstringThe ID attribute for the backdrop element.
dataTestIdstringThe data-testid attribute for testing.
onClickfunctionCallback function to handle the backdrop click event.
appendToHTMLElementThe element to which the backdrop should be appended. If not provided, it will default to specific elements (#root, #__next, or document.body).
classNamestringAdditional class name for styling purposes.
childrennodeThe child elements to be rendered inside the backdrop.

Usage

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

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

  return (
    <BolttechThemeProvider theme={bolttechTheme}>
      <Backdrop
        id="custom-backdrop"
        dataTestId="backdrop-test"
        onClick={handleBackdropClick}
        appendTo={document.getElementById('custom-container')}
        className="custom-backdrop-class"
      >
        {/* Content to display within the backdrop */}
      </Backdrop>
    </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.20.0

10 months ago

0.19.2

1 year ago

0.19.1

1 year ago

0.0.1

1 year ago

0.19.0

2 years ago

0.18.1

2 years ago

0.17.2

2 years ago

0.18.2

2 years ago

0.17.4

2 years ago

0.11.0

2 years ago

0.13.0

2 years ago

0.15.0

2 years ago

0.16.0

2 years ago

0.17.0

2 years ago

0.18.0

2 years ago

0.10.0

2 years ago

0.9.0

2 years ago

0.4.4

2 years ago

0.9.2

2 years ago

0.9.1

2 years ago

0.5.0

2 years ago

0.7.0

2 years ago

0.6.0

2 years ago

0.3.0

2 years ago

0.4.1

2 years ago

0.4.0

2 years ago

0.4.3

2 years ago

0.4.2

2 years ago

0.2.3

2 years ago

0.2.2

2 years ago

0.1.1

2 years ago

0.2.0

2 years ago

0.1.0

2 years ago