-
-
Notifications
You must be signed in to change notification settings - Fork 42
Add the clock scale #6
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
Conversation
src/entry.js
Outdated
| import Clock from './Clock'; | ||
|
|
||
| import './Clock.css'; | ||
| import './Clock.less'; |
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.
That can't be like that - less is compiled to css on build for compatibility reasons. Not everybody uses less.
src/Mark.jsx
Outdated
| }} | ||
| /> | ||
|
|
||
| {number ? |
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.
Instead of ternary, you can simply use this syntax: argument && <Component>
src/Clock.jsx
Outdated
| width={hourMarksWidth} | ||
| />, | ||
| ); | ||
| if (this.props.showNumber) { |
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.
This could be a ternary. No need to duplicate this much code.
<Mark
...
number={this.props.showNumber ? i : null}
...
/>|
That's super nice! Thanks! |
|
Thanks for your advice. I'll change it and continue to submit it. |
|
Any update on this PR? Excited about the new feature. |
|
Sorry, been super busy lately. @yhlben thanks for contributing and for all the fixes, perfect! |
|
Good deal, thanks man. Are you still pushing updates to the npm package? |
|
Yes, absolutely. 2.3.0 was released with this change, although I changed flag name to |
Add the clock scale.Use showNumber prop to show scale.
