0.1.2 • Published 11 months ago

@chainplatform/countdown v0.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

React Native Count Down

@chainplatform/countdown is a React Native library that provides a CountDown component that renders timer count down for react-native and react-native-web.

Install

npm install @chainplatform/countdown --save

or

yarn add @chainplatform/countdown

Usage

import React from 'react';
import {StyleSheet} from 'react-native';
import CountDown from '@chainplatform/countdown';

class App extends React.Component {

  render() {
    return (
      <View style={{flex:1}}>
            <CountDown
                until={this.countTime}
                running={true}
                onFinish={() => {
                    this.setState({
                        count_finish: true
                    })
                }}
                timeToShow={['M', 'S']}
                timeLabels={{ m: '', s: '' }}
                showSeparator
            />
      </View>
    );
  }
}