1.0.4 • Published 2 years ago

@nilevia/count-down-timer-react v1.0.4

Weekly downloads
12
License
MIT
Repository
github
Last release
2 years ago

count-down-timer-react

Use this module to get countdown timer by given date.

NPM JavaScript Style Guide

Install

npm install --save @nilevia/count-down-timer-react

Features

  • Countdown Dourly 12 : 34 : 01
  • Countdown Daily 01 : 12 : 11 : 23
  • Custom Affix 12 Hr 34 Day 01 Sec
  • Custom Operator 12 - 02 - 59
  • Customable Style Using className
  • On Finish Callback using onFinish

Example

import React from 'react'

import { CountDownHourly, CountDownDaily } from 'count-down-timer-react'
import 'count-down-timer-react/dist/index.css'

const App = () => {
    const finishFunction = () =>{
        console.log("im finish")
    }
  return(
  <div className="txt-center-hoz">

    <CountDownHourly
      endDate={"2020-10-08T06:50:18.346Z"}
    />

    <CountDownDaily
      endDate={"2020-10-08T06:50:18.346Z"}
      dayAffix="Hari"
      hourAffix="Jam"
      minutesAffix="Menit"
      secondAffix="Detik"
      operator="-"
      onFinish={finishFunction}
    />

    <CountDownDaily
      endDate={"2020-10-08T06:50:18.346Z"}
      dayAffix="day"
      hourAffix="hrs"
      minutesAffix="min"
      secondAffix="sec"
      className="light-blue bold font-muli-20"
    />

    <CountDownDaily
      endDate={"2020-10-30T06:50:17.346Z"}
      dayAffix="Day"
      hourAffix="Hour"
      minutesAffix="Minutes"
      secondAffix="Second"
      className="red font-muli-20"
      operator=" "
    />

  </div>
  )
}

export default App

demo

License

MIT © nilevia

1.0.2

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.1

4 years ago

1.0.0

4 years ago