1 | import { createComponent } from "reakit-system/createComponent";
|
2 | import { createHook } from "reakit-system/createHook";
|
3 | import {
|
4 | unstable_GridCellOptions as GridCellOptions,
|
5 | unstable_GridCellHTMLProps as GridCellHTMLProps,
|
6 | unstable_useGridCell as useGridCell,
|
7 | } from "../Grid/GridCell";
|
8 | import { COMBOBOX_GRID_CELL_KEYS } from "./__keys";
|
9 | import {
|
10 | unstable_ComboboxItemOptions as ComboboxItemOptions,
|
11 | unstable_ComboboxItemHTMLProps as ComboboxItemHTMLProps,
|
12 | unstable_useComboboxItem as useComboboxItem,
|
13 | } from "./ComboboxItem";
|
14 |
|
15 | export const unstable_useComboboxGridCell = createHook<
|
16 | unstable_ComboboxGridCellOptions,
|
17 | unstable_ComboboxGridCellHTMLProps
|
18 | >({
|
19 | name: "ComboboxGridCell",
|
20 | compose: [useComboboxItem, useGridCell],
|
21 | keys: COMBOBOX_GRID_CELL_KEYS,
|
22 | });
|
23 |
|
24 | export const unstable_ComboboxGridCell = createComponent({
|
25 | as: "span",
|
26 | memo: true,
|
27 | useHook: unstable_useComboboxGridCell,
|
28 | });
|
29 |
|
30 | export type unstable_ComboboxGridCellOptions = GridCellOptions &
|
31 | ComboboxItemOptions;
|
32 |
|
33 | export type unstable_ComboboxGridCellHTMLProps = GridCellHTMLProps &
|
34 | ComboboxItemHTMLProps;
|
35 |
|
36 | export type unstable_ComboboxGridCellProps = unstable_ComboboxGridCellOptions &
|
37 | unstable_ComboboxGridCellHTMLProps;
|