@watch-state/react-router-modal
v1.1.1
Published
Pop-ups related to URL
Downloads
2
Maintainers
Readme
@watch-state/react-router-modal
Pop-ups related to URL with React 16.8+ and watch-state.
Install
npm
npm i @watch-state/react-router-modal
yarn
yarn add @watch-state/react-router-modal
Usage
All modals should be placed into Modals
.
import RouterModal, {Modals, OpenModal} from '@watch-state/react-router-modal'
import theme from '@watch-state/react-router-modal/theme/default.module.scss'
export default () => (
<>
<OpenModal id='test'>Open</OpenModal>
<Modals className={theme.modals}>
<RouterModal id='test' delay={300} classNames={theme}>
Test modal
</RouterModal>
</Modals>
</>
)
Issues
If you find a bug, please file an issue on GitHub