Skip to content

Commit

Permalink
dont shrink the list view icon
Browse files Browse the repository at this point in the history
  • Loading branch information
invisal committed Aug 26, 2024
1 parent ba9d3b4 commit f507746
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/components/listview/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ function Indentation({ depth }: { depth: number }) {
if (depth <= 0) return null;

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

Expand All @@ -104,7 +104,7 @@ function CollapsedButton({
)}
</div>
) : (
<div className="w-4"></div>
<div className="w-4 flex-shrink-0"></div>
);
}

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

{item.icon && (
<item.icon className={cn("w-4 h-4 mr-1", item.iconColor)} />
<item.icon
className={cn(
"w-4 h-4 mr-1 flex-shrink-0",
item.iconColor
)}
/>
)}
<div className="text-xs">
<Highlight text={item.name} highlight={highlight} />
Expand Down

0 comments on commit f507746

Please sign in to comment.