mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
feat: Add tooltips to color mode switcher
This commit is contained in:
parent
6e917dcbb0
commit
fb015332f2
@ -24,16 +24,13 @@
|
||||
},
|
||||
"common": {
|
||||
"hotkeysLabel": "Hotkeys",
|
||||
"themeLabel": "Theme",
|
||||
"darkMode": "Dark Mode",
|
||||
"lightMode": "Light Mode",
|
||||
"languagePickerLabel": "Language",
|
||||
"reportBugLabel": "Report Bug",
|
||||
"githubLabel": "Github",
|
||||
"discordLabel": "Discord",
|
||||
"settingsLabel": "Settings",
|
||||
"darkTheme": "Dark",
|
||||
"lightTheme": "Light",
|
||||
"greenTheme": "Green",
|
||||
"oceanTheme": "Ocean",
|
||||
"langArabic": "العربية",
|
||||
"langEnglish": "English",
|
||||
"langDutch": "Nederlands",
|
||||
|
@ -1,13 +1,20 @@
|
||||
import { useColorMode } from '@chakra-ui/react';
|
||||
import IAIIconButton from 'common/components/IAIIconButton';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { FaMoon, FaSun } from 'react-icons/fa';
|
||||
|
||||
const ColorModeButton = () => {
|
||||
const { colorMode, toggleColorMode } = useColorMode();
|
||||
const { t } = useTranslation();
|
||||
|
||||
return (
|
||||
<IAIIconButton
|
||||
aria-label="Toggle Color Mode"
|
||||
aria-label={
|
||||
colorMode === 'dark' ? t('common.lightMode') : t('common.darkMode')
|
||||
}
|
||||
tooltip={
|
||||
colorMode === 'dark' ? t('common.lightMode') : t('common.darkMode')
|
||||
}
|
||||
size="sm"
|
||||
icon={
|
||||
colorMode === 'dark' ? (
|
||||
|
Loading…
Reference in New Issue
Block a user