mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Dark mode listener
This commit is contained in:
parent
ccbaf402bd
commit
88aa43c34a
1 changed files with 4 additions and 3 deletions
|
|
@ -1,13 +1,14 @@
|
|||
/* eslint-disable functional/no-class */
|
||||
/* eslint-disable functional/no-this-expression */
|
||||
import { isDarkTheme } from '../../../lib/themeUpdater'
|
||||
import { useCurrentTheme } from '../../../lib/hooks/useCurrentTheme'
|
||||
import { useDarkModeListener } from '../../../lib/hooks/useDarkModeListener'
|
||||
import { IconProps } from './IconProps'
|
||||
|
||||
import React from 'react'
|
||||
|
||||
export function ConfusedSlothIcon(): JSX.Element {
|
||||
const isDark = isDarkTheme()
|
||||
return isDark ? <ConfusedSlothIconDark /> : <ConfusedSlothIconLight />
|
||||
const isDarkMode = useDarkModeListener()
|
||||
return isDarkMode ? <ConfusedSlothIconDark /> : <ConfusedSlothIconLight />
|
||||
}
|
||||
|
||||
class ConfusedSlothIconDark extends React.Component<IconProps> {
|
||||
|
|
|
|||
Loading…
Reference in a new issue