Files
t3code/apps/mobile/src/features/layout/workspace-content-width.ts
T

11 lines
451 B
TypeScript

import { createContext, use } from "react";
import type { SharedValue } from "react-native-reanimated";
// Floating controls follow the visible pane while the expensive navigator/feed
// stays laid out at its settled width during sidebar and inspector transitions.
export const WorkspaceContentWidthContext = createContext<SharedValue<number> | null>(null);
export function useWorkspaceContentWidth() {
return use(WorkspaceContentWidthContext);
}