Merge pull request #108 from zhujun24/input-size

component input size
This commit is contained in:
偏右 2015-08-03 16:47:55 +08:00
commit c87c37329c
3 changed files with 22 additions and 1 deletions

View File

@ -0,0 +1,20 @@
# 三种大小
- order: 1
三种大小的输入框,`size`为`lg`和`sm`分别表示高为`32px`和`22px`,默认`28px`。
---
````jsx
// or require('antd/lib/datepicker');
var Datepicker = antd.Datepicker;
React.render(
<div>
<Datepicker size="sm" value="" />
<Datepicker value="" />
<Datepicker size="lg" value="" />
</div>
, document.getElementById('components-datepicker-demo-size'));
````

View File

@ -74,7 +74,7 @@ export default React.createClass({
value={this.state.value}
prefixCls="ant-calendar-picker"
onChange={this.handleChange}>
<input placeholder={this.props.placeholder} className="ant-calendar-picker-input ant-input" />
<input placeholder={this.props.placeholder} className={'ant-calendar-picker-input ant-input ant-input-' + this.props.size}/>
</Datepicker>
);
}

View File

@ -26,6 +26,7 @@
| onSelect | 选择日期的回调 | function | 无 |
| showTime | 显示时间选择条 | boolean | false |
| disabled | 禁用 | bool | false |
| size | 输入框大小,`lg`代表高为32px`sm`代表高为22px默认28px | string | 无 |
<style>
.code-box-demo .ant-calendar-picker-input {