2015-09-27 16:30:35 +08:00
|
|
|
import React from 'react';
|
2015-10-09 16:42:08 +08:00
|
|
|
import rcUtil from 'rc-util';
|
2015-09-27 16:30:35 +08:00
|
|
|
|
|
|
|
const prefix = 'ant-btn-group-';
|
|
|
|
|
|
|
|
export default class ButtonGroup extends React.Component {
|
|
|
|
render() {
|
|
|
|
const {size, className, ...others} = this.props;
|
2015-10-09 16:42:08 +08:00
|
|
|
const classes = rcUtil.classSet({
|
|
|
|
'ant-btn-group': true,
|
|
|
|
[prefix + size]: size,
|
|
|
|
[className]: className
|
|
|
|
});
|
2015-09-27 16:30:35 +08:00
|
|
|
|
2015-10-09 16:42:08 +08:00
|
|
|
return <div {...others} className={classes} />;
|
2015-09-27 16:30:35 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
ButtonGroup.propTypes = {
|
|
|
|
size: React.PropTypes.string,
|
|
|
|
};
|