From 0a3379a8530f365e2bd85e8ea20a1dfc8126c39c Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Fri, 02 Feb 2024 18:10:25 +0000
Subject: [PATCH] fix(search): null checks and focus fixes
---
quartz/components/Darkmode.tsx | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/quartz/components/Darkmode.tsx b/quartz/components/Darkmode.tsx
index a668c5b..6d10bb9 100644
--- a/quartz/components/Darkmode.tsx
+++ b/quartz/components/Darkmode.tsx
@@ -4,10 +4,11 @@
import darkmodeScript from "./scripts/darkmode.inline"
import styles from "./styles/darkmode.scss"
import { QuartzComponentConstructor, QuartzComponentProps } from "./types"
+import { classNames } from "../util/lang"
function Darkmode({ displayClass }: QuartzComponentProps) {
return (
- <div class={`darkmode ${displayClass ?? ""}`}>
+ <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