Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ A timer component for React that counts down to zero for a specified number of m
`initialTimeRemaining: Number`
The time remaining for the countdown (in ms).

`className: String`
Custom class name to be applied to the timer

`interval: Number (optional -- default: 1000ms)`
The time between timer ticks (in ms).

Expand Down
4 changes: 3 additions & 1 deletion countdown_timer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ var React = require('react');
// props:
// - initialTimeRemaining: Number
// The time remaining for the countdown (in ms).
// - className: String
// Custom class name to be applied to the timer
//
// - interval: Number (optional -- default: 1000ms)
// The time between timer ticks (in ms).
Expand Down Expand Up @@ -126,7 +128,7 @@ var CountdownTimer = React.createClass({
var timeRemaining = this.state.timeRemaining;

return (
<div className='timer'>
<div className={this.props.className}>
{this.getFormattedTime(timeRemaining)}
</div>
);
Expand Down