Open History to see the last commit
1import {
2 Select,
3 SelectContent,
4 SelectItem,
5 SelectTrigger,
6 SelectValue,
7} from "@/components/ui/select";
8import { GUIDE_SECTIONS } from "@/guide/content";
9
10import { setActiveSection, useActiveSection } from "./guide-store";
11
12const NONE = "__none__";
13
14/** Dev-only: highlight any guide section by hand, until phase 4 wires it to app state. */
15export function DevSectionPicker() {
16 const activeSectionId = useActiveSection();
17
18 return (
19 <Select
20 value={activeSectionId ?? NONE}
21 onValueChange={(value) => setActiveSection(value === NONE ? null : value)}
22 >
23 <SelectTrigger
24 size="sm"
25 className="w-32 min-w-0 border-dashed text-xs @md/guide:w-36"
26 aria-label="Active section"
27 >
28 <SelectValue />
29 </SelectTrigger>
30 <SelectContent>
31 <SelectItem value={NONE}>No active section</SelectItem>
32 {GUIDE_SECTIONS.map((section) => (
33 <SelectItem key={section.id} value={section.id}>
34 {section.title}
35 </SelectItem>
36 ))}
37 </SelectContent>
38 </Select>
39 );
40}