mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-25 03:29:59 +08:00
fix: radius algorithm (#37369)
This commit is contained in:
parent
46a861afff
commit
d519acb3e6
@ -61,7 +61,7 @@ describe('Theme', () => {
|
||||
12: { radiusBase: 12, radiusLG: 14, radiusSM: 6, radiusXS: 2, radiusOuter: 6 },
|
||||
14: { radiusBase: 14, radiusLG: 16, radiusSM: 7, radiusXS: 2, radiusOuter: 6 },
|
||||
16: { radiusBase: 16, radiusLG: 16, radiusSM: 8, radiusXS: 2, radiusOuter: 6 },
|
||||
20: { radiusBase: 20, radiusLG: 20, radiusSM: 10, radiusXS: 2, radiusOuter: 6 },
|
||||
20: { radiusBase: 16, radiusLG: 16, radiusSM: 8, radiusXS: 2, radiusOuter: 6 },
|
||||
};
|
||||
|
||||
Object.entries(radiusGroup).forEach(([base, result]) => {
|
||||
|
@ -14,7 +14,7 @@ const genRadius = (
|
||||
} else if (radiusBase < 16 && radiusBase >= 6) {
|
||||
radiusLG = radiusBase + 2;
|
||||
} else if (radiusBase >= 16) {
|
||||
radiusLG = radiusBase;
|
||||
radiusLG = 16;
|
||||
}
|
||||
|
||||
// radiusSM
|
||||
@ -27,7 +27,7 @@ const genRadius = (
|
||||
} else if (radiusBase < 16 && radiusBase >= 14) {
|
||||
radiusSM = 7;
|
||||
} else if (radiusBase >= 16) {
|
||||
radiusSM = radiusBase / 2;
|
||||
radiusSM = 8;
|
||||
}
|
||||
|
||||
// radiusXS
|
||||
@ -45,7 +45,7 @@ const genRadius = (
|
||||
}
|
||||
|
||||
return {
|
||||
radiusBase,
|
||||
radiusBase: radiusBase > 16 ? 16 : radiusBase,
|
||||
radiusXS,
|
||||
radiusSM,
|
||||
radiusLG,
|
||||
|
Loading…
Reference in New Issue
Block a user