fix(rn-base): Switch component flex

Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
Innei 2025-01-24 19:42:18 +08:00
parent 8c5c6d9e93
commit 7365eb5e38
No known key found for this signature in database
GPG Key ID: 0F62D33977F021F7
3 changed files with 14 additions and 11 deletions

View File

@ -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">

View File

@ -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>
)}

View File

@ -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>