1.0.11 • Published 7 months ago

modal-cyril-bartz v1.0.11

Weekly downloads
-
License
ISC
Repository
github
Last release
7 months ago

Modal component

Prerequisites

Node.js >= v14

Install package

npm install modal-cyril-bartz

Import the componenent in your application

import {Modal} from "modal-cyril-bartz";

Props

PropTypeDescription
escapeClose = truebooleanAllows the user to close the modal by pressing ESC
clickClose = truebooleanAllows the user to close the modal by clicking inside
showClose = truebooleanShows a (X) icon in the top-right corner
bgroudStyleCSSPropertiesCustom styles for the background around the modal
modalStyleCSSPropertiesCustom styles for the modal
iconCloseStyleCSSPropertiesCustom styles for the (X) icon
openbooleanDetermines if the modal is open or closed
onClosefunctionFunction used to open or close the modal
childrenReact.ReactNodeContent to be displayed within the modal

Testing Status

The Modal component has undergone comprehensive testing to ensure the reliability and functionality of all its features.

Accessibility

The Modal component is designed with accessibility in mind. It provides a seamless experience for all users, including those who rely on assistive technologies.

Usage

  const {show, toggle} = useToggle(false)

  <Modal open={show} onClose={toggle}>
    <div>Hello world!</div>
  </Modal>
1.0.11

7 months ago

1.0.10

7 months ago

1.0.9

7 months ago

1.0.8

7 months ago

1.0.7

7 months ago

1.0.6

7 months ago

1.0.5

7 months ago

1.0.4

7 months ago

1.0.3

7 months ago

1.0.2

7 months ago

1.0.1

7 months ago

1.0.0

7 months ago