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

@bscop/react-modal

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bscop/react-modal

Accessible modal (in React).

  • 2.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
decreased by-90.57%
Maintainers
1
Weekly downloads
 
Created
Source

react-modal

GitHub license npm version CircleCI Status Coverage

Accessible modal (in React).

View in Storybook.

Install

npm i @bscop/react-modal

Usage

import Modal from "@bscop/react-modal";

function App () {
  return (
    <Modal 
      renderContent={
        () => {
          return (
            <div>
              <p>This is the content of the modal ...</p>
            </div>
          );
        }
      }
      renderHook={
        (props) => {
          return (
            <button type="button" {...props}>Show modal</button>
          );
        }
      }
      rootId="modal-root"
      title="About"
    />
  );
}

CSS Custom properties

You can set the following CSS Custom properties to customize the look of the dropdown component:

:root {
  --main-color: black;
  --main-bg-color: white;

  --modal-backdrop-bg-color: rgba(0, 0, 0, .2);
  --modal-border-color: rgba(0, 0, 0, .2);
  --modal-internal-border-color: #dee2e6;
}

Contribute

Read the guidelines.

Run tests

npm test

Coverage

Coverage reports are hosted on codecov.

npm run badge:coverage -- --token=<guid>

Bruno Scopelliti
www.brunoscopelliti.com

Keywords

FAQs

Package last updated on 21 Sep 2021

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