@naschpitz/unique-modal
v1.0.16
Published
A wrapper to react-modal to make it unique through the whole application.
Downloads
5
Readme
@naschpitz/unique-modal
A wrapper to react-modal to make it unique through the whole application.
Install
npm install --save @naschpitz/unique-modal
Usage
This code will open a modal after 2 seconds and then close it after 8 seconds.
import React from 'react';
import {UniqueModal, UniqueModalController} from '@naschpitz/unique-modal';
const App = () => {
setTimeout(() => {
UniqueModalController.open(<div>Modal successfully opened.</div>)
}, 2000);
setTimeout(() => {
UniqueModalController.close();
}, 10000);
return <UniqueModal/>
}
export default App
License
MIT © naschpitz