-
Notifications
You must be signed in to change notification settings - Fork 378
feat(DropdownButton): DropdownButton and SplitButton components #130
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
| @@ -0,0 +1 @@ | |||
| export { DropdownButton as default } from 'react-bootstrap'; | |||
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.
does it make sense to add snapshots? this will ensure markup doesnt change on a newer upgrade of react-bootstrap?
c29e36b to
d84cc9a
Compare
|
@ohadlevy - I change it to use the |
src/components/Button/SplitButton.js
Outdated
|
|
||
| const SplitButton = props => <BsSplitButton {...props} />; | ||
|
|
||
| SplitButton.propTypes = Object.assign(BsSplitButton.propTypes, { |
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.
same as above
|
|
||
| DropdownButton.propTypes = Object.assign(BsDropdownButton.propTypes, { | ||
| bsStyle: PropTypes.oneOf(BUTTON_BS_STYLES), | ||
| }); |
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 modifies also the BsDropdownButton.propTypes. To make it correct you either need to use
DropdownButton.propTypes = Object.assign({}, BsDropdownButton.propTypes, {
bsStyle: PropTypes.oneOf(BUTTON_BS_STYLES),
});
or much simpler:
DropdownButton.propTypes = {
...BsDropdownButton.propTypes,
bsStyle: PropTypes.oneOf(BUTTON_BS_STYLES),
});
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.
d84cc9a to
bcc6e12
Compare
|
Nice catch @jtomasek! Update all of them in the last commit. |
|
Thanks for adding these! They look good to me. :-) |
|
Can you rebase this PR first @sharvit ? |
Export DropdownButton and SplitButton from react-bootstrap re #11
9896cdb
bcc6e12 to
9896cdb
Compare
Export DropdownButton and SplitButton from react-bootstrap
re #11
What: