Skip to content

Commit 78f70cf

Browse files
authored
fix: icon width (#1262)
* fix: icon width
1 parent a29f2fa commit 78f70cf

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/components/IconWrapper/IconWrapper.scss

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,13 @@ $block: '.#{$ns}icon-wrapper';
2727
max-width: 100%;
2828
margin-bottom: $indentXXS;
2929
height: $iconSizePositionTop;
30-
width: $iconSizePositionTop;
3130
object-fit: contain;
3231
display: block;
3332

33+
&_gravity-icon {
34+
width: $iconSizePositionTop;
35+
}
36+
3437
&_icon-position {
3538
&_left {
3639
height: $iconSizePositionLeftSizeS;

src/components/IconWrapper/IconWrapper.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ const IconWrapper = (props: React.PropsWithChildren<IconWrapperProps> & ClassNam
2525
icon={icon?.value}
2626
gravityIcon={gravityIcon?.value}
2727
containerClassName={b('icon-container')}
28-
className={b('icon', {['icon-position']: position, size})}
28+
className={b('icon', {
29+
['icon-position']: position,
30+
size,
31+
['gravity-icon']: Boolean(gravityIcon),
32+
})}
2933
/>
3034
<div className={b('content', {['icon-position']: position})}>{children}</div>
3135
</div>

0 commit comments

Comments
 (0)