Jacky Zhao
2023-11-11 134b6ed582d6ce9d8fb8f1e58d2bae89c07c2d5d
quartz/components/Darkmode.tsx
@@ -3,11 +3,11 @@
// 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"
function Darkmode() {
function Darkmode({ displayClass }: QuartzComponentProps) {
  return (
    <div class="darkmode">
    <div class={`darkmode ${displayClass ?? ""}`}>
      <input class="toggle" id="darkmode-toggle" type="checkbox" tabIndex={-1} />
      <label id="toggle-label-light" for="darkmode-toggle" tabIndex={-1}>
        <svg