fix(ui): tweak lang picker style

This commit is contained in:
psychedelicious 2023-05-12 20:04:10 +10:00
parent eebaa50710
commit 78cf70eaad

View File

@ -1,4 +1,5 @@
import { import {
IconButton,
Menu, Menu,
MenuButton, MenuButton,
MenuItemOption, MenuItemOption,
@ -6,14 +7,13 @@ import {
MenuOptionGroup, MenuOptionGroup,
Tooltip, Tooltip,
} from '@chakra-ui/react'; } from '@chakra-ui/react';
import IAIIconButton from 'common/components/IAIIconButton';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { FaLanguage } from 'react-icons/fa';
import i18n from 'i18n'; import i18n from 'i18n';
import { useAppDispatch, useAppSelector } from 'app/store/storeHooks'; import { useAppDispatch, useAppSelector } from 'app/store/storeHooks';
import { languageSelector } from '../store/systemSelectors'; import { languageSelector } from '../store/systemSelectors';
import { languageChanged } from '../store/systemSlice'; import { languageChanged } from '../store/systemSlice';
import { map } from 'lodash-es'; import { map } from 'lodash-es';
import { IoLanguage } from 'react-icons/io5';
export const LANGUAGES = { export const LANGUAGES = {
ar: i18n.t('common.langArabic', { lng: 'ar' }), ar: i18n.t('common.langArabic', { lng: 'ar' }),
@ -43,10 +43,12 @@ export default function LanguagePicker() {
<Menu closeOnSelect={false}> <Menu closeOnSelect={false}>
<Tooltip label={t('common.languagePickerLabel')} hasArrow> <Tooltip label={t('common.languagePickerLabel')} hasArrow>
<MenuButton <MenuButton
as={IAIIconButton} as={IconButton}
icon={<FaLanguage />} icon={<IoLanguage />}
variant="link" variant="link"
aria-label={t('common.languagePickerLabel')} aria-label={t('common.languagePickerLabel')}
fontSize={22}
minWidth={8}
/> />
</Tooltip> </Tooltip>
<MenuList> <MenuList>