Add icon to AppLanguageDropdown (#10977)

This commit is contained in:
Lynx
2026-06-25 16:54:31 -05:00
committed by GitHub
parent c33a35851e
commit 29a0d16b69
+5 -3
View File
@@ -7,9 +7,10 @@ import {sanitizeAppLanguageSetting} from '#/locale/helpers'
import {APP_LANGUAGES} from '#/locale/languages' import {APP_LANGUAGES} from '#/locale/languages'
import {useLanguagePrefs, useLanguagePrefsApi} from '#/state/preferences' import {useLanguagePrefs, useLanguagePrefsApi} from '#/state/preferences'
import {resetPostsFeedQueries} from '#/state/queries/post-feed' import {resetPostsFeedQueries} from '#/state/queries/post-feed'
import {atoms as a, platform, useTheme} from '#/alf' import {atoms as a, platform, useTheme, web} from '#/alf'
import * as Select from '#/components/Select' import * as Select from '#/components/Select'
import {Button} from './Button' import {Button, ButtonIcon} from './Button'
import {Earth_Stroke2_Corner2_Rounded as EarthIcon} from './icons/Globe'
export function AppLanguageDropdown() { export function AppLanguageDropdown() {
const t = useTheme() const t = useTheme()
@@ -57,6 +58,7 @@ export function AppLanguageDropdown() {
native: [a.gap_xs], native: [a.gap_xs],
}), }),
]}> ]}>
<ButtonIcon icon={EarthIcon} size="md" />
<Select.ValueText <Select.ValueText
placeholder={_(msg`Select an app language`)} placeholder={_(msg`Select an app language`)}
style={[t.atoms.text_contrast_medium]} style={[t.atoms.text_contrast_medium]}
@@ -68,7 +70,7 @@ export function AppLanguageDropdown() {
<Select.Content <Select.Content
label={_(msg`Select language`)} label={_(msg`Select language`)}
renderItem={({label, value}) => ( renderItem={({label, value}) => (
<Select.Item value={value} label={label}> <Select.Item value={value} label={label} style={web([a.pointer])}>
<Select.ItemIndicator /> <Select.ItemIndicator />
<Select.ItemText>{label}</Select.ItemText> <Select.ItemText>{label}</Select.ItemText>
</Select.Item> </Select.Item>