react-native-time-counter

1.0.0 • Public • Published

react-native-time-counter

Install

$ npm install react-native-time-counter --save or $ yarn add react-native-time-counter --save

Import

import TimeCounter from 'react-native-time-counter';

Props

Name Description Type Default Value
state Counter type "forward" or "countdown" string forward
countdownSeconds Countdown start seconds number 120
maxSeconds Counter end seconds number null
onCountdownEnd Todo when countdown end function null
onMaxSeconds Todo when counter equal to max seconds null
hideHour To hide hour text boolean true
style Container style object
fontStyle Text style object

Forward Usage

<TimeCounter state={"forward"}
             hideHour={false}
             onMaxSeconds={() => console.log('Test')}
             maxSeconds={10}/>

Countdown Usage

<TimeCounter state={"countdown"}
             hideHour={false}
             onCountdownEnd={()=>console.log('Test')}
             countdownSeconds={10}/>

Readme

Keywords

Package Sidebar

Install

npm i react-native-time-counter

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

22.5 kB

Total Files

13

Last publish

Collaborators

  • caglardurmus