Skip to content

Commit 416b37c

Browse files
authored
fix: make BasicCard icon unshrinkable (#895) (#897)
1 parent b982c0a commit 416b37c

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/components/IconWrapper/IconWrapper.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ $block: '.#{$ns}icon-wrapper';
1616
}
1717
}
1818

19+
&__icon-container {
20+
flex-shrink: 0;
21+
}
22+
1923
&__icon {
2024
max-width: 100%;
2125
margin-bottom: $indentXXS;

src/components/IconWrapper/IconWrapper.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ const IconWrapper = (props: PropsWithChildren<IconWrapperProps>) => {
2121
return (
2222
<div className={b({['icon-position']: iconPosition})}>
2323
{iconProps && (
24-
<Image {...iconProps} className={b('icon', {['icon-position']: iconPosition})} />
24+
<Image
25+
{...iconProps}
26+
containerClassName={b('icon-container')}
27+
className={b('icon', {['icon-position']: iconPosition})}
28+
/>
2529
)}
2630
<div className={b({['content']: iconPosition})}>{children}</div>
2731
</div>

0 commit comments

Comments
 (0)