New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@jdthornton/modal

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jdthornton/modal

React modal component

latest
Source
npmnpm
Version
1.4.2
Version published
Maintainers
1
Created
Source

@jdthornton/modal

npm (scoped) npm bundle size (minified)

React modal component.

Demo

https://jdthornton.github.io/#/modal

Install

$ npm install @jdthornton/modal

Usage

import Modal, { useModal } from "@jdthornton/modal";
import "@jdthornton/modal/styles.css";

function App(){

  const { isOpen, open, close } = useModal();

  return isOpen ? (
    <Modal close={close}>
      Modal
    </Modal>
  ) : null
}

Props

PropTypeDescription
showCloseButtonbooleanShows a modal close button
closeOnOverlayClickbooleanCloses the modal on overlay click
closeOnEscbooleanCloses the modal on 'ESC' key press
inertQuerySelectorstringThe query selector for the element to be made inert when the modal is open
classNamestringThe modal class
styleobjectThe modal style
overlayClassNamestringThe overlay class
overlayStyleobjectThe overlay style
labelledBystringThe aria-labelledby attribute
describedBystringThe aria-describedby attribute

FAQs

Package last updated on 03 Jan 2022

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