Skip to content

Commit

Permalink
Mob: better visually width fitting for categories (spacedriveapp#2114)
Browse files Browse the repository at this point in the history
* Visually width fitting for categories

* remove padding
  • Loading branch information
ameer2468 committed Feb 21, 2024
1 parent 3bdcc05 commit da4f038
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apps/mobile/src/components/overview/Categories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const Categories = ({ kinds }: Props) => {
data={kinds.data?.statistics
?.sort((a, b) => b.count - a.count)
.filter((i) => i.kind !== 0)}
contentContainerStyle={tw`pl-7 pr-14`}
contentContainerStyle={tw`pl-7`}
numColumns={Math.ceil(Number(kinds.data?.statistics.length ?? 0) / 2)}
key={kinds.data?.statistics ? 'kinds' : '_'} //needed to update numColumns when data is available
keyExtractor={(item) => item.name}
Expand All @@ -43,7 +43,7 @@ const Categories = ({ kinds }: Props) => {
break;
}
return (
<View style={twStyle('w-[140px]')}>
<View style={twStyle('w-fit')}>
<KindItem
kind={kind}
name={name}
Expand Down Expand Up @@ -78,7 +78,7 @@ const KindItem = ({ name, icon, items }: KindItemProps) => {
//TODO: implement
}}
>
<View style={twStyle('shrink-0 flex-row items-center', 'gap-2 rounded-lg text-sm')}>
<View style={twStyle('mr-10 shrink-0 flex-row items-center', 'gap-2 rounded-lg text-sm')}>
<Icon name={icon} size={40} style={tw`mr-3 h-12 w-12`} />
<View>
<Text style={tw`text-sm font-medium text-ink`}>{name}</Text>
Expand Down

0 comments on commit da4f038

Please sign in to comment.