chore: initialize qiming workspace repository

This commit is contained in:
Codex
2026-05-29 14:22:48 +08:00
commit bfd67a0f2c
10750 changed files with 1885711 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
import { createElement } from "react"
import { useGlobals } from "storybook/manager-api"
import { ToggleButton } from "storybook/internal/components"
export function ThemeTool() {
const [globals, updateGlobals] = useGlobals()
const mode = globals.theme === "dark" ? "dark" : "light"
const toggle = () => {
const next = mode === "dark" ? "light" : "dark"
updateGlobals({ theme: next })
}
return createElement(
ToggleButton,
{
title: "Toggle theme",
active: mode === "dark",
onClick: toggle,
},
mode === "dark" ? "Dark" : "Light",
)
}