-
Notifications
You must be signed in to change notification settings - Fork 9
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
Update Steps #301
Update Steps #301
Conversation
- Add responsive labels - Add `collapse` props to force show or hide equivalent responsive labels - Add unit tests
Now uses `currentColor` and `.text-success` for theming
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.
Looks good!
src/components/Steps.js
Outdated
); | ||
}; | ||
|
||
Steps.propTypes = { | ||
collapse: PropTypes.bool, |
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.
should we give collapse
a default value?
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.
Thanks for noticing, Paulus and I discussed that we could default to responsive behavior (collapse on < sm) if this prop is not present. True or false would force collapse or expanded labels respectively.
src/components/Steps.js
Outdated
); | ||
}; | ||
|
||
Steps.propTypes = { | ||
collapse: PropTypes.bool, | ||
complete: PropTypes.bool, |
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.
any reason why complete
and step
aren't required?
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.
Complete is only required if done, but good point on step... maybe that should required. Thanks
This updates the Step component to add responsive labels, and ability to force the corresponding collapsed or uncollapsed labels. Showing collapsed:
This also removes 3 hardcoded colors in lieu of using bootstrap
text-primary
andtext-success
classes for better theming