-
Notifications
You must be signed in to change notification settings - Fork 3
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
Extend stars component #36
Conversation
kaytcat
commented
Jan 2, 2017
- Allow stars to be rateable.
- Also accessible and scalable.
I really like how we extended I do not really understand how |
} | ||
|
||
export default class Stars extends Component { | ||
static propTypes = { | ||
color: PropTypes.string, | ||
multiColors: PropTypes.array, |
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.
Do we have fixed values for these arrays (color
and multiColors
) so that we can use check for the values of the elements in the array? Alternatively, can we use a more strict validation with PropTypes.arrayOf
? This would make this issue easier to solve in the future #6
multiColors: PropTypes.array, | ||
name: PropTypes.string, | ||
selectable: PropTypes.bool, | ||
totalStars: PropTypes.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.
We could define the biggest value here, it could maybe be 10?
@@ -0,0 +1 @@ | |||
<Stars value={2} selectable multiColors={['red', 'orange', 'yellow', 'green', 'blue']}/> |
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.
Props should be added on different lines in the docs too.
What is missing in the API is a something like |
Also when everything is ready the docs should be built again - sigh. |
…/nukleus into KUNPRO-67-implement-star-selector
…/nukleus into KUNPRO-67-implement-star-selector
…/nukleus into KUNPRO-67-implement-star-selector