use-modals-back-button-navigation

1.0.0 • Public • Published

What is this?

Handle closing modals, drawers, accordions or any other component that has a toggling function for opening and closing the component.

when clicking on the browser back button or the mobile native back button.

Installation

npm i --save use-modals-back-button-navigation

Then...

import useModalsBackButtonNavigation from 'use-modals-back-button-navigation';

useModalsBackButtonNavigation({
    onClose: onClose,
    hash: 'modal-example', // or use any name that you want
    isModalOpen: isOpen
});

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.00latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.00

Package Sidebar

Install

npm i use-modals-back-button-navigation

Weekly Downloads

0

Version

1.0.0

License

ISC

Unpacked Size

2.58 kB

Total Files

3

Last publish

Collaborators

  • abdelfattah_atef