UNPKG

727 BTypeScriptView Raw
1import * as React from 'react';
2
3export interface TabContextValue {
4 idPrefix: string;
5 value: string;
6}
7
8export interface TabContextProps {
9 /**
10 * The content of the component.
11 */
12 children?: React.ReactNode;
13 /**
14 * The value of the currently selected `Tab`.
15 */
16 value: string;
17}
18/**
19 *
20 * Demos:
21 *
22 * - [Tabs](https://mui.com/components/tabs/)
23 *
24 * API:
25 *
26 * - [TabContext API](https://mui.com/api/tab-context/)
27 */
28export default function TabContext(props: TabContextProps): JSX.Element;
29export function useTabContext(): TabContextValue | null;
30export function getPanelId(context: TabContextValue, tabValue: string): string;
31export function getTabId(context: TabContextValue, tabValue: string): string;