0.1.13 • Published 7 years ago
react-sticky-timer v0.1.13
React Sticky Timer
Introduction
A simple countdown sticky that sticks to the top. demo
Dependencies
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
- Test/Test coverage report
- CI/CD process
- Remove dependency from moment
Any feedbacks or contributions are welcome!