diff --git a/components/checkbox/demo/basic.md b/components/checkbox/demo/basic.md index 0a533e31b3..d6049ae521 100644 --- a/components/checkbox/demo/basic.md +++ b/components/checkbox/demo/basic.md @@ -14,6 +14,7 @@ function onChange(e) { } React.render( - Checkbox + + Checkbox , container); ```` diff --git a/components/checkbox/demo/controller.md b/components/checkbox/demo/controller.md index bc1e10b28c..e7de3ca435 100644 --- a/components/checkbox/demo/controller.md +++ b/components/checkbox/demo/controller.md @@ -25,7 +25,8 @@ var App = React.createClass({ {label} + onChange={this.onChange} /> + {label}
diff --git a/components/form/demo/mix.md b/components/form/demo/mix.md index 4a8bb571b7..912965c3ed 100644 --- a/components/form/demo/mix.md +++ b/components/form/demo/mix.md @@ -102,13 +102,13 @@ React.render( ant-radio:
diff --git a/style/components/checkbox.less b/style/components/checkbox.less index 145552cd57..3ffdf7a853 100644 --- a/style/components/checkbox.less +++ b/style/components/checkbox.less @@ -1,8 +1,8 @@ -@checkboxWarpPrefixCls: ant-checkbox; -@checkboxInnerPrefixCls: ~"@{checkboxWarpPrefixCls}-inner"; +@checkboxWrapPrefixCls: ant-checkbox; +@checkboxInnerPrefixCls: ~"@{checkboxWrapPrefixCls}-inner"; /* 一般状态 */ -.@{checkboxWarpPrefixCls} { +.@{checkboxWrapPrefixCls} { white-space: nowrap; cursor: pointer; outline: none; @@ -62,7 +62,7 @@ } /* 选中状态 */ -.@{checkboxWarpPrefixCls}-checked { +.@{checkboxWrapPrefixCls}-checked { &:hover { .@{checkboxInnerPrefixCls} { @@ -93,9 +93,9 @@ } } -.@{checkboxWarpPrefixCls}-disabled { +.@{checkboxWrapPrefixCls}-disabled { - &.@{checkboxWarpPrefixCls}-checked { + &.@{checkboxWrapPrefixCls}-checked { &:hover { .@{checkboxInnerPrefixCls} { @@ -133,3 +133,7 @@ cursor: default; } } + +.@{checkboxWrapPrefixCls} + span { + margin-left: 8px; +} diff --git a/style/components/form.less b/style/components/form.less index f21c1db0f6..0400b33451 100644 --- a/style/components/form.less +++ b/style/components/form.less @@ -163,10 +163,8 @@ input[type="checkbox"] { padding-top: 7px; padding-bottom: 7px; > input[type="radio"], - > input[type="checkbox"], - > .@{css-prefix}checkbox, - > .@{css-prefix}radio { - margin-right: 3px; + > input[type="checkbox"] { + margin-right: 5px; } } } diff --git a/style/components/radio.less b/style/components/radio.less index f0584d6757..5db8c04c36 100644 --- a/style/components/radio.less +++ b/style/components/radio.less @@ -1,9 +1,9 @@ -@radioWarpPrefixCls: ant-radio; -@radioInnerPrefixCls: ~"@{radioWarpPrefixCls}-inner"; +@radioWrapPrefixCls: ant-radio; +@radioInnerPrefixCls: ~"@{radioWrapPrefixCls}-inner"; @radioDuration: .3s; /* 一般状态 */ -.@{radioWarpPrefixCls} { +.@{radioWrapPrefixCls} { white-space: nowrap; outline: none; display: inline-block; @@ -60,7 +60,7 @@ } /* 选中状态 */ -.@{radioWarpPrefixCls}-checked { +.@{radioWrapPrefixCls}-checked { .@{radioInnerPrefixCls} { border-color: #d9d9d9; @@ -72,7 +72,7 @@ } } -.@{radioWarpPrefixCls}-disabled { +.@{radioWrapPrefixCls}-disabled { &:hover { .@{radioInnerPrefixCls} { border-color: #d9d9d9; @@ -90,3 +90,7 @@ cursor: default; } } + +.@{radioWrapPrefixCls} + span { + margin-left: 8px; +}