@team-devmonster/react-modal
v1.1.3
Published
This is devmonster's react module for make app easily. This is compatible with devmonster's react-native modules.
Downloads
7
Readme
@team-devmonster/react-modal
This is simple react modal. This can use like react-native modal.
author: devmonster
We are always looking for investment or assistance. hompage: https://devmonster.co.kr email: [email protected]
items
- [o] [modal]
Getting started
$ npm install @team-devmonster/react-modal@latest
Examples
Easy. Too Easy.
usage
import React, { useState } from "react";
import { Modal } from "@team-devmonster/react-modal";
export const AnyComponent = ({ visible, onRequestClose }) => {
const [visible, setVisible] = useState(false);
return (
<>
<Button
onClick={() => setVisible(true)}
fill="outline">
react-modal
</Button>
<Modal visible={visible} onRequestClose={() => console.log('on request close')}>
<Div style={{ position: 'fixed', top: 0, left: 0, width: '100%', height: '100%' }}>
<P>devmonster's react-modal</P>
<Button onClick={() => { setVisible(false) }}>close</Button>
</Div>
</Modal>
</>
)
}
devmonsters
modules
for javascript
for react
for react-native