import { useState } from "react"; import { createRoot } from "react-dom/client"; import { useComposerToolbarFit } from "@/prompt-editor/useComposerToolbarFit.js"; import { Button } from "@/components/ui/button.js"; import { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, } from "@/components/ui/dropdown-menu.js"; import "@/styles.css"; const params = new URLSearchParams(location.search); const theme = params.get("theme") === "light" ? "light" : "dark"; const chinese = params.get("locale") === "zh-CN"; document.documentElement.className = `${theme} theme-zai-${theme}`; function Fixture() { const ref = useComposerToolbarFit(); const [long, setLong] = useState(false); return ( setLong(!long)}>Change label {[0, 1, 2].map((priority) => ( + {chinese ? ["电脑", "模式", "计划"][priority] : ["Computer", "Mode", "Plan"][priority]} ))} M {long ? "Long model name ".repeat(12) : chinese ? "模型" : "Model"} {chinese ? "高" : "High"} Model option ↑ ); } createRoot(document.getElementById("root")!).render();