Dark mode listener

This commit is contained in:
Jackson Harper 2024-02-22 22:15:17 +08:00
parent ccbaf402bd
commit 88aa43c34a

View file

@ -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> {