Initial Commit

This commit is contained in:
2026-05-27 23:29:53 +01:00
commit fbc70f96e6
10000 changed files with 1102152 additions and 0 deletions

View File

@@ -0,0 +1 @@
import{j as a}from"./jsx-runtime-D_zvdyIk.js";import{r as t}from"./index-DhY--VwN.js";function i(){if(typeof localStorage>"u")return"light";const e=localStorage.getItem("theme");return e==="light"||e==="dark"?e:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function n(){const[e,o]=t.useState(i);return t.useEffect(()=>{document.documentElement.setAttribute("data-theme",e),localStorage.setItem("theme",e)},[e]),a.jsx("button",{type:"button","aria-label":`Switch to ${e==="light"?"dark":"light"} mode`,"data-testid":"theme-toggle",onClick:()=>o(r=>r==="light"?"dark":"light"),className:"rounded px-2 py-1 text-sm hover:bg-gray-100 dark:hover:bg-gray-700",children:e==="light"?"Moon":"Sun"})}n.__docgenInfo={description:"",methods:[],displayName:"ThemeToggle"};export{n as T};