viskan-deku-popup
v3.0.0
Published
Popup/modal component for deku
Downloads
6
Readme
viskan-deku-popup
Popup/modal component for deku
Install
$ npm install --save viskan-deku-popup
Usage
import Popup from 'viskan-deku-popup';
const openPopup = (setState) => {
setState({open: true});
};
const render = ({state}, setState) => {
const {open} = state;
return (
<Button onClick={openPopup(setState)}>Open popup!</Button>
<Popup open={open}>
<h1>Hello world!</h1>
</Popup>
);
};
export default {render};