/watch-state-react-router-modal

Cool pop-ups related to URL

Primary LanguageJavaScriptMIT LicenseMIT

Watch-State logo by Mikhail Lysikov

  @watch-state/react-router-modal

 

NPM minzipped size downloads changelog license

Pop-ups related to URL with React 16.8+ and watch-state.

stars watchers

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

issues