1.0.4 • Published 6 years ago

react-native-cusomized-countdown-component v1.0.4

Weekly downloads
22
License
-
Repository
github
Last release
6 years ago

react-native-countdown

React Native CountDown

Installation

Run npm install react-native-countdown-component --save OR yarn add react-native-countdown-component --save

Props

NameDescriptionTypeDefault Value
styleOverride the component styleobject{}
digitBgColorDigit background colorstring#FAB913 '#FAB913'
digitTxtColorDigit text colorstring#000000 '#000000'
timeTxtColorTime labels text colorstring#000000 '#000000'
sizeSize of the countdown componentnumber15
untilNumber of seconds to countdownnumber0
onFinishWhat function should be invoked when the time is 0funcnull
onPressWhat function should be invoked when clicking on the timerfuncnull
timeToShowWhat Digits to showarray'D', 'H', 'M', 'S'
labelD/H/M/SText to show in labelstring'Days' / 'Hours' / 'Minutes' / 'Seconds'

Preview

React Native Countdown

Code

import CountDown from 'react-native-countdown-component';

render() {
    return (
      <CountDown
        until={10}
        onFinish={() => alert('finished')}
        onPress={() => alert('hello')}
        size={20}
      />
    )
}