Skip to content

A lightweight, macOS-style dock for Windows 11, with glass visuals, smooth magnification, and Genie effect.

835 B
Raw Blame
---
/** A labelled switch of the Settings replica. `sub` rows fold away with the menu bar. */
import { type SettingsKey, settingsText } from "@/data/showcase";

interface Props {
  name: SettingsKey;
  hint?: SettingsKey;
  on: boolean;
  sub?: boolean;
}

const { name, hint, on, sub = false } = Astro.props;
const t = settingsText.en;
---

<div class:list={["settings-row", sub && "settings-row-sub"]} data-row={name}>
  <span class="settings-text">
    <span class="settings-label" data-t={name}>
      {t[name]}
    </span>
    {hint && (
      <span class="settings-hint" data-t={hint}>
        {t[hint]}
      </span>
    )}
  </span>
  <button
    type="button"
    role="switch"
    class="mac-switch"
    aria-checked={on ? "true" : "false"}
    aria-label={t[name]}
    data-setting={name}
  >
    <i></i>
  </button>
</div>