-
Notifications
You must be signed in to change notification settings - Fork 29
Adding the ability to override class name #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Adding the ability to override class name #11
Conversation
README.md
Outdated
| `initialTimeRemaining: Number` | ||
| The time remaining for the countdown (in ms). | ||
|
|
||
| `setClass: String (optional -- default: 'timer')` |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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"
There was a problem hiding this comment.
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.
|
Thanks for the PR! I added a couple of small comments. |
|
No problem, Happy to help... I added a few more comments as well. |
…nd COMMENTS to reflect the change
|
Updated the code to reflect what we talked about above. |
|
One last little thing: Can you add a default |
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.