UNPKG

880 BTypeScriptView Raw
1/// <reference types="react" />
2export interface UseTabPanelParameters {
3 /**
4 * The id of the TabPanel.
5 */
6 id?: string;
7 /**
8 * The ref of the TabPanel.
9 */
10 rootRef?: React.Ref<HTMLElement>;
11 /**
12 * The value of the TabPanel. It will be shown when the Tab with the corresponding value is selected.
13 */
14 value?: number | string;
15}
16export interface UseTabPanelRootSlotProps {
17 'aria-labelledby'?: string;
18 hidden?: boolean;
19 id?: string;
20 ref: React.Ref<HTMLElement>;
21}
22export interface UseTabPanelReturnValue {
23 /**
24 * If `true`, it indicates that the tab panel will be hidden.
25 */
26 hidden: boolean;
27 /**
28 * Resolver for the root slot's props.
29 * @returns props that should be spread on the root slot
30 */
31 getRootProps: () => UseTabPanelRootSlotProps;
32 rootRef: React.Ref<HTMLElement>;
33}