1.0.3 • Published 6 years ago

react-count-down-view v1.0.3

Weekly downloads
1
License
ISC
Repository
github
Last release
6 years ago

react-count-down-view

a simple react component for count down

Use

npm install react-count-down-view

Sample code

    import CountDownView from 'react-count-down-view'

    <CountDownView name="count-first" second={10} trigger={onCountEnd} />

    // 1: you should name your count view
    // 2: set an int value 'second' for count number
    // 3: set a 'trigger' func when count to end
    <CountDownView name="count-two" second={4} trigger={onCountEnd} />

    // you can set another counter named 'count-two'
    // they will count in one 'setTimeout' callback
    let CustomView = function(props) {
        let { second, trigger } = props
        return <div>{second}</div>
    }

    <CountDownView name="count-two" second={4} trigger={onCountEnd} view={CustomView}/>

    // you can set your custom count view by set 'view' props
1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago