1
0
mirror of https://github.com/trezor/trezor-wallet synced 2025-01-08 07:01:04 +00:00

display flag in language picker

This commit is contained in:
slowbackspace 2019-02-25 19:37:24 +01:00
parent 1f79614935
commit 5ad47423e2

View File

@ -15,12 +15,12 @@ const SelectWrapper = styled.div`
const SelectIcon = styled.span`
padding: 0px 6px;
margin-right: -20px;
margin-right: -38px;
`;
const StyledSelect = styled.select`
height: 100%;
padding-left: 20px;
padding-left: 32px;
border: 0;
background: transparent;
cursor: pointer;
@ -33,7 +33,11 @@ const StyledSelect = styled.select`
const LanguagePicker = ({ language, fetchLocale }: Props) => (
<SelectWrapper>
<SelectIcon role="img" aria-label="Select language">🌎</SelectIcon>
<SelectIcon role="img" aria-label="Select language">
<svg width="32" height="24">
<image xlinkHref={`l10n/flags/${language}.svg`} width="32" height="24" />
</svg>
</SelectIcon>
<StyledSelect
onChange={e => fetchLocale(e.target.value)}
value={language}