@invisionag/iris-react-modal
v6.5.2
Published
```js import { Modal, ModalClose, ModalBody, ModalHeader, ModalFooter } from '@invisionag/iris-react-modal'; ```
Downloads
273
Maintainers
Keywords
Readme
import {
Modal,
ModalClose,
ModalBody,
ModalHeader,
ModalFooter
} from '@invisionag/iris-react-modal';
The modal component is based on https://github.com/reactjs/react-modal, you should follow the documentation of the project.
Usage:
closeHandler
, isOpen
, contentLabel
are required props.
The Modal
component is a container component and has to have ModalHeader
, ModalBody
, ModalFooter
as children.
<Modal
closeHandler={this.handleCloseModal}
isOpen={boolean}
contentLabel="A11y label"
>
<ModalHeader>Headline</ModalHeader>
<ModalBody>
Information text
</ModalBody>
<ModalFooter>
<Button onClick={this.handleCloseModal}>
Cancel button
</Button>
<Button danger>Confirm button</Button>
</ModalFooter>
</Modal>