diff --git a/components/theme/__tests__/token.test.tsx b/components/theme/__tests__/token.test.tsx index 7bf3fecb39..48cfcf6c8d 100644 --- a/components/theme/__tests__/token.test.tsx +++ b/components/theme/__tests__/token.test.tsx @@ -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]) => { diff --git a/components/theme/themes/shared/genRadius.ts b/components/theme/themes/shared/genRadius.ts index e6dd4804e6..780ee3b68e 100644 --- a/components/theme/themes/shared/genRadius.ts +++ b/components/theme/themes/shared/genRadius.ts @@ -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,