From 6ba138b4fa4a9ed48a79fd2f65202c97b8d66e6f Mon Sep 17 00:00:00 2001
From: 1900 <me@1900.live>
Date: Tue, 30 Jan 2024 17:58:09 +0000
Subject: [PATCH] feat: support selfhost umami (#764)

---
 quartz/components/Darkmode.tsx |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/quartz/components/Darkmode.tsx b/quartz/components/Darkmode.tsx
index afbf2bd..6d10bb9 100644
--- a/quartz/components/Darkmode.tsx
+++ b/quartz/components/Darkmode.tsx
@@ -3,11 +3,12 @@
 // see: https://v8.dev/features/modules#defer
 import darkmodeScript from "./scripts/darkmode.inline"
 import styles from "./styles/darkmode.scss"
-import { QuartzComponentConstructor } from "./types"
+import { QuartzComponentConstructor, QuartzComponentProps } from "./types"
+import { classNames } from "../util/lang"
 
-function Darkmode() {
+function Darkmode({ displayClass }: QuartzComponentProps) {
   return (
-    <div class="darkmode">
+    <div class={classNames(displayClass, "darkmode")}>
       <input class="toggle" id="darkmode-toggle" type="checkbox" tabIndex={-1} />
       <label id="toggle-label-light" for="darkmode-toggle" tabIndex={-1}>
         <svg
@@ -18,7 +19,7 @@
           x="0px"
           y="0px"
           viewBox="0 0 35 35"
-          style="enable-background:new 0 0 35 35;"
+          style="enable-background:new 0 0 35 35"
           xmlSpace="preserve"
         >
           <title>Light mode</title>
@@ -34,7 +35,7 @@
           x="0px"
           y="0px"
           viewBox="0 0 100 100"
-          style="enable-background='new 0 0 100 100'"
+          style="enable-background:new 0 0 100 100"
           xmlSpace="preserve"
         >
           <title>Dark mode</title>

--
Gitblit v1.10.0