diff --git a/components/select/__tests__/__snapshots__/demo.test.js.snap b/components/select/__tests__/__snapshots__/demo.test.js.snap index 437960776e..1c815a38a5 100644 --- a/components/select/__tests__/__snapshots__/demo.test.js.snap +++ b/components/select/__tests__/__snapshots__/demo.test.js.snap @@ -541,38 +541,66 @@ exports[`renders ./components/select/demo/select-users.md correctly 1`] = ` exports[`renders ./components/select/demo/size.md correctly 1`] = `
- + + Large + + + +
+
+
- Lucy + a1
+
-
- Lucy -
+
    + +
+
+
+ +
+
+
+ +
`; diff --git a/components/select/demo/size.md b/components/select/demo/size.md index 0697786efc..30e016d3de 100644 --- a/components/select/demo/size.md +++ b/components/select/demo/size.md @@ -1,8 +1,8 @@ --- order: 1 -title: +title: zh-CN: 三种大小 - en-US: Three sizes + en-US: Sizes --- ## zh-CN @@ -14,35 +14,83 @@ title: The height of the inpub field for the select defaults to 28px. If size is set to large, the height will be 32px, and if set to small, 22px. ````jsx -import { Select } from 'antd'; +import { Select, Radio } from 'antd'; const Option = Select.Option; -function handleChange(value) { - console.log(`selected ${value}`); +const children = []; +for (let i = 10; i < 36; i++) { + children.push(); } -ReactDOM.render( -
- - - -
-, mountNode); +function handleChange(value) { + console.log(`Selected: ${value}`); +} + +class SelectSizesDemo extends React.Component { + state = { + size: 'default', + }; + + handleSizeChange = (e) => { + this.setState({ size: e.target.value }); + } + + render() { + const { size } = this.state; + return ( +
+ + Large + Default + Small + +

+ +
+ +
+ +
+ +
+ ); + } +} + +ReactDOM.render(, mountNode); ```` ````css