Skip to content

Commit

Permalink
Button component add reset props.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Oct 29, 2017
1 parent 834ff2e commit 7f5b949
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/button/ButtonGroup.js
Expand Up @@ -4,22 +4,23 @@ import "./style/buttons-group.less";

export default class ButtonGroup extends Component {
render() {
const { prefixCls, vertical, children, className } = this.props;
const { prefixCls, vertical, children, className, ...resetProps } = this.props;
const cls = this.classNames({
[`${prefixCls}-group`]: true,
[`${prefixCls}-group-vertical`]: vertical,
[className]: className
});

return (
<div className={cls}>
<div className={cls} {...resetProps}>
{children}
</div>
);
}
};

ButtonGroup.propTypes = {
prefixCls: PropTypes.string,
vertical: PropTypes.bool
};
ButtonGroup.defaultProps = {
Expand Down

0 comments on commit 7f5b949

Please sign in to comment.