update button size demo

This commit is contained in:
afc163 2017-09-11 15:17:48 +08:00
parent 1cdf0d9141
commit bb2c2036ba
2 changed files with 47 additions and 18 deletions

View File

@ -480,12 +480,13 @@ exports[`renders ./components/button/demo/size.md correctly 1`] = `
class="ant-radio-group" class="ant-radio-group"
> >
<label <label
class="ant-radio-button-wrapper" class="ant-radio-button-wrapper ant-radio-button-wrapper-checked"
> >
<span <span
class="ant-radio-button" class="ant-radio-button ant-radio-button-checked"
> >
<input <input
checked=""
class="ant-radio-button-input" class="ant-radio-button-input"
type="radio" type="radio"
/> />
@ -498,13 +499,12 @@ exports[`renders ./components/button/demo/size.md correctly 1`] = `
</span> </span>
</label> </label>
<label <label
class="ant-radio-button-wrapper ant-radio-button-wrapper-checked" class="ant-radio-button-wrapper"
> >
<span <span
class="ant-radio-button ant-radio-button-checked" class="ant-radio-button"
> >
<input <input
checked=""
class="ant-radio-button-input" class="ant-radio-button-input"
type="radio" type="radio"
/> />
@ -538,7 +538,40 @@ exports[`renders ./components/button/demo/size.md correctly 1`] = `
<br /> <br />
<br /> <br />
<button <button
class="ant-btn ant-btn-primary ant-btn-circle ant-btn-icon-only" class="ant-btn ant-btn-primary ant-btn-lg"
type="button"
>
<span>
Primary
</span>
</button>
<button
class="ant-btn ant-btn-lg"
type="button"
>
<span>
Normal
</span>
</button>
<button
class="ant-btn ant-btn-dashed ant-btn-lg"
type="button"
>
<span>
Dashed
</span>
</button>
<button
class="ant-btn ant-btn-danger ant-btn-lg"
type="button"
>
<span>
Danger
</span>
</button>
<br />
<button
class="ant-btn ant-btn-primary ant-btn-circle ant-btn-lg ant-btn-icon-only"
type="button" type="button"
> >
<i <i
@ -546,7 +579,7 @@ exports[`renders ./components/button/demo/size.md correctly 1`] = `
/> />
</button> </button>
<button <button
class="ant-btn ant-btn-primary" class="ant-btn ant-btn-primary ant-btn-lg"
type="button" type="button"
> >
<i <i
@ -556,17 +589,9 @@ exports[`renders ./components/button/demo/size.md correctly 1`] = `
Download Download
</span> </span>
</button> </button>
<button
class="ant-btn ant-btn-primary"
type="button"
>
<span>
Normal
</span>
</button>
<br /> <br />
<div <div
class="ant-btn-group" class="ant-btn-group ant-btn-group-lg"
> >
<button <button
class="ant-btn ant-btn-primary" class="ant-btn ant-btn-primary"

View File

@ -22,7 +22,7 @@ import { Button, Radio, Icon } from 'antd';
class ButtonSize extends React.Component { class ButtonSize extends React.Component {
state = { state = {
size: 'default', size: 'large',
}; };
handleSizeChange = (e) => { handleSizeChange = (e) => {
@ -39,9 +39,13 @@ class ButtonSize extends React.Component {
<Radio.Button value="small">Small</Radio.Button> <Radio.Button value="small">Small</Radio.Button>
</Radio.Group> </Radio.Group>
<br /><br /> <br /><br />
<Button type="primary" size={size}>Primary</Button>
<Button size={size}>Normal</Button>
<Button type="dashed" size={size}>Dashed</Button>
<Button type="danger" size={size}>Danger</Button>
<br />
<Button type="primary" shape="circle" icon="download" size={size} /> <Button type="primary" shape="circle" icon="download" size={size} />
<Button type="primary" icon="download" size={size}>Download</Button> <Button type="primary" icon="download" size={size}>Download</Button>
<Button type="primary" size={size}>Normal</Button>
<br /> <br />
<Button.Group size={size}> <Button.Group size={size}>
<Button type="primary"> <Button type="primary">