1 | /// <reference types="react" />
|
2 | import { TabsProviderValue } from './TabsProvider';
|
3 | export interface UseTabsParameters {
|
4 | /**
|
5 | * The value of the currently selected `Tab`.
|
6 | * If you don't want any selected `Tab`, you can set this prop to `false`.
|
7 | */
|
8 | value?: string | number | null;
|
9 | /**
|
10 | * The default value. Use when the component is not controlled.
|
11 | */
|
12 | defaultValue?: string | number | null;
|
13 | /**
|
14 | * The component orientation (layout flow direction).
|
15 | * @default 'horizontal'
|
16 | */
|
17 | orientation?: 'horizontal' | 'vertical';
|
18 | /**
|
19 | * The direction of the text.
|
20 | * @default 'ltr'
|
21 | */
|
22 | direction?: 'ltr' | 'rtl';
|
23 | /**
|
24 | * Callback invoked when new value is being set.
|
25 | */
|
26 | onChange?: (event: React.SyntheticEvent | null, value: number | string | null) => void;
|
27 | /**
|
28 | * If `true` the selected tab changes on focus. Otherwise it only
|
29 | * changes on activation.
|
30 | */
|
31 | selectionFollowsFocus?: boolean;
|
32 | }
|
33 | export interface UseTabsReturnValue {
|
34 | /**
|
35 | * Returns the values to be passed to the tabs provider.
|
36 | */
|
37 | contextValue: TabsProviderValue;
|
38 | }
|