The best way to control Claude Code, Codex and more from any computer or phone

main
ts 19 lines 828 Bytes
Raw
1 import { useNativeWorkspaceColumnsSupported } from "../../native/NativeWorkspaceColumns";
2 import { withNativeGlassHeaderItem } from "./native-glass-header-items";
3 import { useSidebarToggle } from "./useSidebarToggle";
4
5 /** `useSidebarToggle` as a native header item. */
6 export function useWorkspaceSidebarHeaderItem() {
7 const usesNativeWorkspaceColumns = useNativeWorkspaceColumnsSupported();
8 const toggle = useSidebarToggle();
9 if (!toggle) return null;
10 return withNativeGlassHeaderItem({
11 axisBehavior: usesNativeWorkspaceColumns ? "horizontalOnly" : undefined,
12 accessibilityLabel: toggle.accessibilityLabel,
13 icon: { name: toggle.icon, type: "sfSymbol" as const },
14 identifier: "thread-left-sidebar",
15 label: toggle.accessibilityLabel,
16 onPress: toggle.onPress,
17 type: "button" as const,
18 });
19 }