karkipy / react-time-expiry

A react module component for time expiry warning after a session is about to end.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

screen shot 2019-01-20 at 9 33 41 pm

With params

screen shot 2019-01-20 at 9 35 44 pm

About

A react module component for time expiry warning after a session is about to end.

License:MIT License


Languages

Language:JavaScript 95.5%Language:CSS 4.5%