1 | import {
|
2 | SealedInitialState,
|
3 | useSealedState,
|
4 | } from "reakit-utils/useSealedState";
|
5 | import {
|
6 | useCompositeState,
|
7 | CompositeState,
|
8 | CompositeActions,
|
9 | CompositeInitialState,
|
10 | } from "../Composite/CompositeState";
|
11 |
|
12 | export type unstable_GridState = CompositeState;
|
13 |
|
14 | export type unstable_GridActions = CompositeActions;
|
15 |
|
16 | export type unstable_GridInitialState = CompositeInitialState;
|
17 |
|
18 | export type unstable_GridStateReturn = unstable_GridState &
|
19 | unstable_GridActions;
|
20 |
|
21 | export function unstable_useGridState(
|
22 | initialState: SealedInitialState<unstable_GridInitialState> = {}
|
23 | ): unstable_GridStateReturn {
|
24 | const sealed = useSealedState(initialState);
|
25 | return useCompositeState(sealed);
|
26 | }
|