npm.io
0.1.13 • Published 9 years ago

react-sticky-timer

Licence
Version
0.1.13
Deps
3
Vulns
0
Weekly
0

React Sticky Timer

Build Status

Introduction

A simple countdown sticky that sticks to the top. demo

Dependencies

momentjs


Install
    npm install --save react-sticky-timer
Usage
    const units = {
        seconds: '',
        minutes: ':',
        hours: ':',
        days: 'day',
        years: 'year',
        months: 'month'
    };
    <StickyTimer
        textMessage={this.state.message}
        end={moment(this.state.end)}
        units={units}
        countDownMessage={this.state.countDownMessage}
    />
All options
  static propTypes = {
     end: PropTypes.object,
     units: PropTypes.object,
     textMessage: PropTypes.string,
     countDownMessage: PropTypes.string,
     styleSticky: PropTypes.object,
     styleText: PropTypes.object,
     styleTimer: PropTypes.object,
     classNameText: PropTypes.string,
     classNameTimer: PropTypes.string,
     classNameSticky: PropTypes.string
  };
Help

Refer to App.js

Improvement
  1. Test/Test coverage report
  2. CI/CD process
  3. Remove dependency from moment

Any feedbacks or contributions are welcome!