MCPcopy
hub / github.com/TheOrcDev/8bitcn-ui / ThemeSelector

Function ThemeSelector

components/theme-selector.tsx:19–50  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17import { ScrollArea } from "./ui/8bit/scroll-area";
18
19export function ThemeSelector() {
20 const { activeTheme, setActiveTheme } = useThemeConfig();
21
22 return (
23 <div className="flex items-center justify-between gap-2 border-y border-dashed p-5">
24 <div className="w-64">
25 <SelectThemeDropdown
26 activeTheme={activeTheme}
27 setActiveTheme={setActiveTheme}
28 />
29 </div>
30
31 <Dialog>
32 <DialogTrigger asChild>
33 <Button>Copy</Button>
34 </DialogTrigger>
35 <DialogContent>
36 <ScrollArea className="max-h-[80vh]">
37 <DialogHeader>
38 <DialogTitle>Theme</DialogTitle>
39 <DialogDescription>
40 Copy and paste the following code into your CSS file.
41 </DialogDescription>
42 </DialogHeader>
43
44 <CodeSnippet>{getThemeCode(activeTheme)}</CodeSnippet>
45 </ScrollArea>
46 </DialogContent>
47 </Dialog>
48 </div>
49 );
50}

Callers

nothing calls this directly

Calls 2

useThemeConfigFunction · 0.90
getThemeCodeFunction · 0.90

Tested by

no test coverage detected