lg => large, sm => small

This commit is contained in:
afc163 2015-10-26 11:02:48 +08:00
parent 5b448af596
commit cad3fdff45
10 changed files with 27 additions and 27 deletions

View File

@ -11,10 +11,10 @@ var Button = antd.Button;
var Icon = antd.Icon;
ReactDOM.render(<div>
<Button type="primary" shape="circle" size="lg">
<Button type="primary" shape="circle" size="large">
<Icon type="search" />
</Button>
<Button type="primary" size="lg">
<Button type="primary" size="large">
<Icon type="search" />
大按钮
</Button>
@ -27,23 +27,23 @@ ReactDOM.render(<div>
中按钮
</Button>
<Button type="primary" shape="circle" size="sm">
<Button type="primary" shape="circle" size="small">
<Icon type="search" />
</Button>
<Button type="primary" size="sm">
<Button type="primary" size="small">
<Icon type="search" />
小按钮
</Button>
<br />
<Button type="ghost" shape="circle-outline" size="lg">
<Button type="ghost" shape="circle-outline" size="large">
<Icon type="search" />
</Button>
<Button type="ghost" shape="circle-outline">
<Icon type="search" />
</Button>
<Button type="ghost" shape="circle-outline" size="sm">
<Button type="ghost" shape="circle-outline" size="small">
<Icon type="search" />
</Button>
</div>,

View File

@ -22,13 +22,13 @@ var App = React.createClass({
},
render() {
return <div>
<Button type="primary" size="lg" loading>
<Button type="primary" size="large" loading>
加载中
</Button>
<Button type="primary" loading="true">
加载中
</Button>
<Button type="primary" size="sm" loading>
<Button type="primary" size="small" loading>
加载中
</Button>
<br />

View File

@ -11,23 +11,23 @@ var Button = antd.Button;
var Icon = antd.Icon;
ReactDOM.render(<div>
<Button type="primary" shape="circle" size="lg">
<Button type="primary" shape="circle" size="large">
<Icon type="search" />
</Button>
<Button type="primary" shape="circle">
<Icon type="search" />
</Button>
<Button type="primary" shape="circle" size="sm">
<Button type="primary" shape="circle" size="small">
<Icon type="search" />
</Button>
<br />
<Button type="ghost" shape="circle-outline" size="lg">
<Button type="ghost" shape="circle-outline" size="large">
<Icon type="search" />
</Button>
<Button type="ghost" shape="circle-outline">
<Icon type="search" />
</Button>
<Button type="ghost" shape="circle-outline" size="sm">
<Button type="ghost" shape="circle-outline" size="small">
<Icon type="search" />
</Button>
</div>

View File

@ -31,12 +31,12 @@ var App = React.createClass({
</label>
</p>
<p>
<Button type="primary" size="sm"
<Button type="primary" size="small"
onClick={this.toggleChecked}>
{!this.state.checked ? "选中":"取消"}
</Button>
<Button style={{'marginLeft': '10px'}}
type="primary" size="sm"
type="primary" size="small"
onClick={this.toggleDisable}>
{!this.state.disabled ? "不可用":"可用"}
</Button>

View File

@ -73,18 +73,18 @@ export default function (props) {
<div className="ant-confirm-content">{props.content}</div>
</div>;
let footer = <div className="ant-confirm-btns">
<Button size="lg" onClick={onCancel}> </Button>
<Button type="primary" size="lg" onClick={onOk}> </Button>
<Button size="large" onClick={onCancel}> </Button>
<Button type="primary" size="large" onClick={onOk}> </Button>
</div>;
if (props.okCancel) {
footer = <div className="ant-confirm-btns">
<Button size="lg" onClick={onCancel}> </Button>
<Button type="primary" size="lg" onClick={onOk}> </Button>
<Button size="large" onClick={onCancel}> </Button>
<Button type="primary" size="large" onClick={onOk}> </Button>
</div>;
} else {
footer = <div className="ant-confirm-btns">
<Button type="primary" size="lg" onClick={onOk}>知道了</Button>
<Button type="primary" size="large" onClick={onOk}>知道了</Button>
</div>;
}

View File

@ -40,8 +40,8 @@ var Test = React.createClass({
visible={this.state.visible}
title="对话框标题" onOk={this.handleOk} onCancel={this.handleCancel}
footer={[
<Button key="back" size="lg" onClick={this.handleCancel}>返 回</Button>,
<Button key="submit" type="primary" size="lg" loading={this.state.loading} onClick={this.handleOk}>
<Button key="back" size="large" onClick={this.handleCancel}>返 回</Button>,
<Button key="submit" type="primary" size="large" loading={this.state.loading} onClick={this.handleOk}>
提 交
</Button>
]}>

View File

@ -76,10 +76,10 @@ let AntModal = React.createClass({
render() {
let props = this.props;
let defaultFooter = [
<Button key="cancel" size="lg" onClick={this.handleCancel}> </Button>,
<Button key="cancel" size="large" onClick={this.handleCancel}> </Button>,
<Button key="confirm"
type="primary"
size="lg"
size="large"
loading={this.state.confirmLoading}
onClick={this.handleOk}>

View File

@ -20,7 +20,7 @@ var openNotification = function() {
// 隐藏提醒框
notification.close(key);
};
var btn = <Button type="primary" size="sm" onClick={btnClick}>
var btn = <Button type="primary" size="small" onClick={btnClick}>
自定义关闭按钮并触发回调函数
</Button>;
notification.open({

View File

@ -48,8 +48,8 @@ export default React.createClass({
</p>
<div className={prefixCls + '-buttons'}>
<Button onClick={this.cancel} size="sm"> </Button>
<Button onClick={this.confirm} type="primary" size="sm"> </Button>
<Button onClick={this.cancel} size="small"> </Button>
<Button onClick={this.confirm} type="primary" size="small"> </Button>
</div>
</div>
</div>;

View File

@ -59,7 +59,7 @@ class TreeDemo extends React.Component {
</TreeNode>
<TreeNode key="p12" title="leaf"/>
</Tree>
<Button type="primary" size="sm" onClick={this.handleClick}>点此控制树节点</Button>
<Button type="primary" size="small" onClick={this.handleClick}>点此控制树节点</Button>
</div>);
}
}