fix theme opposite labels (#700)
This commit is contained in:
parent
b132ff7a76
commit
6dde5ede34
2 changed files with 38 additions and 3 deletions
|
@ -11,13 +11,14 @@ import {s} from 'lib/styles'
|
|||
import {useStores} from 'state/index'
|
||||
import {pluralize} from 'lib/strings/helpers'
|
||||
import {useColorSchemeStyle} from 'lib/hooks/useColorSchemeStyle'
|
||||
import {MoonIcon} from 'lib/icons'
|
||||
import {MoonIcon, SunIcon} from 'lib/icons'
|
||||
import {formatCount} from 'view/com/util/numeric/format'
|
||||
|
||||
export const DesktopRightNav = observer(function DesktopRightNav() {
|
||||
const store = useStores()
|
||||
const pal = usePalette('default')
|
||||
const mode = useColorSchemeStyle('Light', 'Dark')
|
||||
const otherMode = mode === 'Dark' ? 'Light' : 'Dark';
|
||||
|
||||
const onDarkmodePress = React.useCallback(() => {
|
||||
store.shell.setDarkMode(!store.shell.darkMode)
|
||||
|
@ -71,10 +72,15 @@ export const DesktopRightNav = observer(function DesktopRightNav() {
|
|||
: 'Sets display to dark mode'
|
||||
}>
|
||||
<View style={[pal.viewLight, styles.darkModeToggleIcon]}>
|
||||
<MoonIcon size={18} style={pal.textLight} />
|
||||
{
|
||||
mode === 'Dark' ?
|
||||
<SunIcon size={18} style={pal.textLight} />
|
||||
:
|
||||
<MoonIcon size={18} style={pal.textLight} />
|
||||
}
|
||||
</View>
|
||||
<Text type="sm" style={pal.textLight}>
|
||||
{mode} mode
|
||||
{otherMode} mode
|
||||
</Text>
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue