feat: light/dark modes switch immediately with the system theme (#95)

This commit is contained in:
xingo xu
2024-06-06 02:20:05 +09:00
committed by GitHub
parent 3f4e7e9f97
commit c3ac8d9728
3 changed files with 62 additions and 22 deletions

View File

@@ -1,3 +1,5 @@
import type { LIGHT_MODE, DARK_MODE, AUTO_MODE } from "@constants/constants"
export type SiteConfig = {
title: string
subtitle: string
@@ -17,7 +19,7 @@ export type SiteConfig = {
}
export type Favicon = {
src: string,
src: string
theme?: 'light' | 'dark'
sizes?: string
}
@@ -54,3 +56,5 @@ export type LicenseConfig = {
name: string
url: string
}
export type LIGHT_DARK_MODE = typeof LIGHT_MODE | typeof DARK_MODE | typeof AUTO_MODE