Skip to content

Conversation

@ryantallmadge
Copy link

Im using dynamically built css (babel-plugin-css-in-js) so the classnames are not predictable. Adding this would make it so I could style in code and pass along the class name for the timer.

README.md Outdated
`initialTimeRemaining: Number`
The time remaining for the countdown (in ms).

`setClass: String (optional -- default: 'timer')`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer to call this className for consistency with other React components.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought about this, but didn't think it was explicit enough for what is was actually doing, if you want to always have "timer" as a class, I would recommend changing this to something like "appendClassname"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, I take back the idea of always including a 'timer' class. That's not really the concern of this component. Then I think calling it className makes more sense and would make this behave similarly to many other React components.

@rvierich
Copy link
Contributor

Thanks for the PR! I added a couple of small comments.

@ryantallmadge
Copy link
Author

No problem, Happy to help... I added a few more comments as well.

@ryantallmadge
Copy link
Author

ryantallmadge commented Apr 18, 2016

Updated the code to reflect what we talked about above.
Full changes: https://github.com/uken/react-countdown-timer/pull/11/files

@rvierich
Copy link
Contributor

One last little thing: Can you add a default className of timer to getDefaultProps? That way the component won't break for anyone who is currently using it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants