Skip to content

Commit

Permalink
fix(rn-base): Switch component flex
Browse files Browse the repository at this point in the history
Signed-off-by: Innei <tukon479@gmail.com>
  • Loading branch information
Innei committed Jan 24, 2025
1 parent 8c5c6d9 commit 7365eb5
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
6 changes: 5 additions & 1 deletion apps/mobile/src/components/ui/form/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,11 @@ export function Select<T>({
)}
style={wrapperStyle}
>
<Text className="flex-1 font-semibold text-accent" ellipsizeMode="middle" numberOfLines={1}>
<Text
className="min-w-0 flex-1 text-right font-semibold text-accent"
ellipsizeMode="middle"
numberOfLines={1}
>
{valueToLabelMap.get(currentValue)}
</Text>
<View className="ml-auto shrink-0 pl-1">
Expand Down
2 changes: 1 addition & 1 deletion apps/mobile/src/components/ui/grouped/GroupedList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export const GroupedInsetListCell: FC<{
return (
<GroupedInsetListBaseCell className="flex-1">
<View className="flex-1">
<Text>{label}</Text>
<Text className="text-label">{label}</Text>
{!!description && (
<Text className="text-secondary-label text-sm leading-tight">{description}</Text>
)}
Expand Down
17 changes: 8 additions & 9 deletions apps/mobile/src/modules/settings/routes/General.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,14 @@ export const GeneralScreen = () => {

<GroupedInsetListBaseCell>
<Text>Translation Language</Text>
<View className="w-[180px]">
<Select
value={translationLanguage}
onValueChange={(value) => {
setGeneralSetting("translationLanguage", value)
}}
options={Object.values(LanguageMap)}
/>
</View>

<Select
value={translationLanguage}
onValueChange={(value) => {
setGeneralSetting("translationLanguage", value)
}}
options={Object.values(LanguageMap)}
/>
</GroupedInsetListBaseCell>
</GroupedInsetListCard>
</View>
Expand Down

0 comments on commit 7365eb5

Please sign in to comment.