Skip to content

Commit

Permalink
fix: radio align (#39476)
Browse files Browse the repository at this point in the history
* fix: radio align

* chore: code clean

* fix: align-self center

* chore: code clean

* chore: code clean
  • Loading branch information
MadCcc committed Dec 12, 2022
1 parent de31c90 commit 2d5c8fe
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions components/radio/style/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ const getRadioBasicStyle: GenerateStyle<RadioToken> = (token) => {
componentCls,
radioWrapperMarginRight,
radioCheckedColor,
radioTop,
radioSize,
motionDurationSlow,
motionDurationMid,
Expand Down Expand Up @@ -135,10 +134,10 @@ const getRadioBasicStyle: GenerateStyle<RadioToken> = (token) => {
[componentCls]: {
...resetComponent(token),
position: 'relative',
insetBlockStart: radioTop,
display: 'inline-block',
outline: 'none',
cursor: 'pointer',
alignSelf: 'center',
},

[`${componentCls}-wrapper:hover &,
Expand Down Expand Up @@ -487,8 +486,6 @@ export default genComponentStyleHook('Radio', (token) => {
controlItemBgActiveDisabled,
colorTextDisabled,
colorBgContainer,
fontSize,
lineHeight,
fontSizeLG,
controlOutline,
colorPrimaryHover,
Expand All @@ -506,7 +503,6 @@ export default genComponentStyleHook('Radio', (token) => {
const radioButtonFocusShadow = radioFocusShadow;

const radioSize = fontSizeLG;
const radioTop = (Math.round(fontSize * lineHeight) - radioSize) / 2;
const dotPadding = 4; // Fixed value
const radioDotDisabledSize = radioSize - dotPadding * 2;
const radioDotSize = wireframe ? radioDotDisabledSize : radioSize - (dotPadding + lineWidth) * 2;
Expand All @@ -524,7 +520,6 @@ export default genComponentStyleHook('Radio', (token) => {
radioFocusShadow,
radioButtonFocusShadow,
radioSize,
radioTop,
radioDotSize,
radioDotDisabledSize,
radioCheckedColor,
Expand Down

0 comments on commit 2d5c8fe

Please sign in to comment.