mirror of
https://github.com/ant-design/ant-design.git
synced 2025-08-05 23:46:28 +08:00
lg => large, sm => small
This commit is contained in:
parent
5b448af596
commit
cad3fdff45
@ -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>,
|
||||
|
@ -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 />
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>;
|
||||
}
|
||||
|
||||
|
@ -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>
|
||||
]}>
|
||||
|
@ -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}>
|
||||
确 定
|
||||
|
@ -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({
|
||||
|
@ -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>;
|
||||
|
@ -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>);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user