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": {
|
"common": {
|
||||||
"hotkeysLabel": "Hotkeys",
|
"hotkeysLabel": "Hotkeys",
|
||||||
"themeLabel": "Theme",
|
"darkMode": "Dark Mode",
|
||||||
|
"lightMode": "Light Mode",
|
||||||
"languagePickerLabel": "Language",
|
"languagePickerLabel": "Language",
|
||||||
"reportBugLabel": "Report Bug",
|
"reportBugLabel": "Report Bug",
|
||||||
"githubLabel": "Github",
|
"githubLabel": "Github",
|
||||||
"discordLabel": "Discord",
|
"discordLabel": "Discord",
|
||||||
"settingsLabel": "Settings",
|
"settingsLabel": "Settings",
|
||||||
"darkTheme": "Dark",
|
|
||||||
"lightTheme": "Light",
|
|
||||||
"greenTheme": "Green",
|
|
||||||
"oceanTheme": "Ocean",
|
|
||||||
"langArabic": "العربية",
|
"langArabic": "العربية",
|
||||||
"langEnglish": "English",
|
"langEnglish": "English",
|
||||||
"langDutch": "Nederlands",
|
"langDutch": "Nederlands",
|
||||||
|
@ -1,13 +1,20 @@
|
|||||||
import { useColorMode } from '@chakra-ui/react';
|
import { useColorMode } from '@chakra-ui/react';
|
||||||
import IAIIconButton from 'common/components/IAIIconButton';
|
import IAIIconButton from 'common/components/IAIIconButton';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
import { FaMoon, FaSun } from 'react-icons/fa';
|
import { FaMoon, FaSun } from 'react-icons/fa';
|
||||||
|
|
||||||
const ColorModeButton = () => {
|
const ColorModeButton = () => {
|
||||||
const { colorMode, toggleColorMode } = useColorMode();
|
const { colorMode, toggleColorMode } = useColorMode();
|
||||||
|
const { t } = useTranslation();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<IAIIconButton
|
<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"
|
size="sm"
|
||||||
icon={
|
icon={
|
||||||
colorMode === 'dark' ? (
|
colorMode === 'dark' ? (
|
||||||
|
Loading…
Reference in New Issue
Block a user