1 | import { createComponent } from "reakit-system/createComponent";
|
2 | import { createHook } from "reakit-system/createHook";
|
3 | import {
|
4 | CompositeGroupOptions,
|
5 | CompositeGroupHTMLProps,
|
6 | useCompositeGroup,
|
7 | } from "../Composite/CompositeGroup";
|
8 | import { GRID_ROW_KEYS } from "./__keys";
|
9 |
|
10 | export type unstable_GridRowOptions = CompositeGroupOptions;
|
11 |
|
12 | export type unstable_GridRowHTMLProps = CompositeGroupHTMLProps;
|
13 |
|
14 | export type unstable_GridRowProps = unstable_GridRowOptions &
|
15 | unstable_GridRowHTMLProps;
|
16 |
|
17 | export const unstable_useGridRow = createHook<
|
18 | unstable_GridRowOptions,
|
19 | unstable_GridRowHTMLProps
|
20 | >({
|
21 | name: "GridRow",
|
22 | compose: useCompositeGroup,
|
23 | keys: GRID_ROW_KEYS,
|
24 |
|
25 | useProps(_, htmlProps) {
|
26 | return { role: "row", ...htmlProps };
|
27 | },
|
28 | });
|
29 |
|
30 | export const unstable_GridRow = createComponent({
|
31 | as: "div",
|
32 | useHook: unstable_useGridRow,
|
33 | });
|