Merge pull request #466 from benjycui/feat-button

feat: make `Button` easy to use
This commit is contained in:
偏右 2015-11-03 14:48:33 +08:00
commit d184d87308
5 changed files with 11 additions and 10 deletions

View File

@ -2,14 +2,15 @@
- order: 5
可以将多个 `Button` 放入 `ButtonGroup` 的容器中。
可以将多个 `Button` 放入 `Button.Group` 的容器中。
通过设置 `size``large` `small` 分别把按钮组合设为大、小尺寸。若不设置 `size`,则尺寸为中。
---
````jsx
import { Button, ButtonGroup, Icon } from 'antd';
import { Button, Icon } from 'antd';
const ButtonGroup = Button.Group;
ReactDOM.render(<div>
<h4>基本组合</h4>

View File

@ -1,7 +1,5 @@
import Button from './button';
import ButtonGroup from './button-group';
export {
Button,
ButtonGroup,
};
Button.Group = ButtonGroup;
export default Button;

View File

@ -7,8 +7,9 @@
---
````jsx
import { Progress, Button, ButtonGroup, Icon } from 'antd';
import { Progress, Button, Icon } from 'antd';
const ProgressCircle = Progress.Circle;
const ButtonGroup = Button.Group;
const MyProgress = React.createClass({
getInitialState() {

View File

@ -7,8 +7,9 @@
---
````jsx
import { Progress, Button, ButtonGroup, Icon } from 'antd';
import { Progress, Button, Icon } from 'antd';
const ProgressLine = Progress.Line;
const ButtonGroup = Button.Group;
const MyProgress = React.createClass({
getInitialState() {

View File

@ -50,8 +50,8 @@ const antd = {
Badge: require('./components/badge'),
Menu: require('./components/menu'),
Timeline: require('./components/timeline'),
Button: require('./components/button').Button,
ButtonGroup: require('./components/button').ButtonGroup,
Button: require('./components/button'),
ButtonGroup: require('./components/button').Group,
Icon: require('./components/iconfont'),
Row: require('./components/layout').Row,
Col: require('./components/layout').Col,