react-time-expiry
v0.3.0
Published
react module for warning as session is about to end
Downloads
9
Readme
react-time-expiry
A react module component for time expiry warning after a session is about to end.
Install
npm install --save react-time-expiry
Paramaters :
- time = time in minutes for the modal to last, default is 60 seconds
- onClickOk = what to do when ok is clicked, will dismiss the modal after the function call
- onCancel = what to do when cancel is clicked or it is clicked outside the component, will dismiss the modal after the function call
- Message = optional message after warning of some seconds remaining
Usage
No Params
import SessionAlert from 'react-time-expiry';
<SessionAlert />
With params
import SessionAlert from 'react-time-expiry';
<SessionAlert
time={3}
Message="Extend more ?"
/>
Output
No Params
With params