Skip to content

Commit f507746

Browse files
committed
dont shrink the list view icon
1 parent ba9d3b4 commit f507746

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

src/components/listview/index.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ function Indentation({ depth }: { depth: number }) {
8282
if (depth <= 0) return null;
8383

8484
return new Array(depth).fill(false).map((_, idx: number) => {
85-
return <div key={idx} className={cn("w-4")}></div>;
85+
return <div key={idx} className={cn("w-4 flex-shrink-0")}></div>;
8686
});
8787
}
8888

@@ -104,7 +104,7 @@ function CollapsedButton({
104104
)}
105105
</div>
106106
) : (
107-
<div className="w-4"></div>
107+
<div className="w-4 flex-shrink-0"></div>
108108
);
109109
}
110110

@@ -212,7 +212,12 @@ function renderList<T>(props: ListViewRendererProps<T>): React.ReactElement {
212212
)}
213213

214214
{item.icon && (
215-
<item.icon className={cn("w-4 h-4 mr-1", item.iconColor)} />
215+
<item.icon
216+
className={cn(
217+
"w-4 h-4 mr-1 flex-shrink-0",
218+
item.iconColor
219+
)}
220+
/>
216221
)}
217222
<div className="text-xs">
218223
<Highlight text={item.name} highlight={highlight} />

0 commit comments

Comments
 (0)