feat: Emit custom event when theme changes ()

* Emit custom event when theme changes

* Type themechange custom event

* Update darkmode docs
This commit is contained in:
kabirgh 2024-01-23 22:52:41 +00:00 committed by GitHub
parent 1ce12fc1fc
commit 0a76707062
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 22 additions and 7 deletions

1
index.d.ts vendored
View file

@ -6,6 +6,7 @@ declare module "*.scss" {
// dom custom event
interface CustomEventMap {
nav: CustomEvent<{ url: FullSlug }>
themechange: CustomEvent<{ theme: "light" | "dark" }>
}
declare const fetchData: Promise<ContentIndex>