feat: v5 radio (#37449)

This commit is contained in:
MadCcc 2022-09-08 09:55:10 +08:00 committed by GitHub
parent b4f4873d54
commit 39d155bfff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -162,7 +162,7 @@ const getRadioBasicStyle: GenerateStyle<RadioToken> = token => {
height: radioSize,
marginBlockStart: radioSize / -2,
marginInlineStart: radioSize / -2,
backgroundColor: radioDotColor,
backgroundColor: radioButtonBg,
borderBlockStart: 0,
borderInlineStart: 0,
borderRadius: radioSize,
@ -201,6 +201,7 @@ const getRadioBasicStyle: GenerateStyle<RadioToken> = token => {
[`${componentCls}-checked`]: {
[radioInnerPrefixCls]: {
borderColor: radioDotColor,
backgroundColor: radioDotColor,
'&::after': {
transform: `scale(${radioDotSize / radioSize})`,
@ -481,7 +482,6 @@ export default genComponentStyleHook('Radio', token => {
padding,
controlLineWidth,
colorBgContainerDisabled,
paddingXXS,
colorTextDisabled,
colorBgContainer,
fontSize,
@ -494,6 +494,7 @@ export default genComponentStyleHook('Radio', token => {
colorPrimary,
marginXS,
controlOutlineWidth,
fontSizeIcon,
} = token;
// Radio
@ -502,7 +503,7 @@ export default genComponentStyleHook('Radio', token => {
const radioSize = fontSizeLG;
const radioTop = (Math.round(fontSize * lineHeight) - radioSize) / 2;
const radioDotSize = radioSize - paddingXXS * 2;
const radioDotSize = fontSizeIcon / 2;
const radioDotColor = colorPrimary;
// Radio buttons