From 0eaf9406721a2df1a1f69cb1fb7ce7e1d333623b Mon Sep 17 00:00:00 2001 From: afc163 Date: Mon, 27 Jun 2016 17:22:03 +0800 Subject: [PATCH] Fix Radio & Checkbox margin again --- components/form/style/index.less | 5 + components/radio/radio.jsx | 11 +- components/radio/style/index.less | 200 +++++++++++++++--------------- 3 files changed, 113 insertions(+), 103 deletions(-) diff --git a/components/form/style/index.less b/components/form/style/index.less index 351b69433a..a075a67d9e 100644 --- a/components/form/style/index.less +++ b/components/form/style/index.less @@ -161,6 +161,11 @@ form { display: block; } + .ant-checkbox-vertical + .ant-checkbox-vertical, + .ant-radio-vertical + .ant-radio-vertical { + margin-left: 0; + } + .ant-input-number { margin-top: -1px; margin-right: 8px; diff --git a/components/radio/radio.jsx b/components/radio/radio.jsx index 5722f39f93..625dbfa07f 100644 --- a/components/radio/radio.jsx +++ b/components/radio/radio.jsx @@ -12,15 +12,20 @@ export default class Radio extends React.Component { } render() { const { prefixCls, children, checked, disabled, className, style } = this.props; + const wrapperClassString = classNames({ + [`${prefixCls}-wrapper`]: true, + [`${prefixCls}-wrapper-checked`]: checked, + [`${prefixCls}-wrapper-disabled`]: disabled, + [className]: !!className, + }); const classString = classNames({ [`${prefixCls}`]: true, [`${prefixCls}-checked`]: checked, [`${prefixCls}-disabled`]: disabled, - [className]: !!className, }); return ( -