Browse Source

fix(rating): size props working error when set number #356 (#435)

tank0317 3 years ago
parent
commit
0f77f3f12e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      packages/semi-ui/rating/item.tsx

+ 1 - 1
packages/semi-ui/rating/item.tsx

@@ -88,7 +88,7 @@ export default class Item extends PureComponent<RatingItemProps> {
             height: size,
             fontSize: size
         } : {};
-        const iconSize = size === 'small' ? 'default' : 'extra-large';
+        const iconSize = isCustomSize ? 'inherit' : (size === 'small' ? 'default' : 'extra-large');
         const content = character ? character : <IconStar size={iconSize} />;
         return (
             <li className={starCls} style={{ ...sizeStyle }}>