Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

workspace-content-width.ts

10 lines451 Bytes

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