封装主题组件
This commit is contained in:
tangly1024
2022-01-03 17:56:12 +08:00
parent 147689b78d
commit 4c707c1df1
3 changed files with 47 additions and 44 deletions

View File

@@ -1,7 +1,8 @@
import { useEffect, useState } from 'react'
import { loadUserThemeFromCookies, saveTheme, useGlobal } from '@/lib/global'
import { useGlobal } from '@/lib/global'
import { faMoon, faSun } from '@fortawesome/free-solid-svg-icons'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { loadUserThemeFromCookies, saveTheme } from '@/lib/theme'
export default function FloatDarkModeButton () {
const [show, switchShow] = useState(false)