UNPKG

1.42 kBTypeScriptView Raw
1import * as React from "react";
2import { AbstractPureComponent2 } from "../../common";
3import { HTMLDivProps, Props } from "../../common/props";
4export declare type TabId = string | number;
5export declare type TabProps = ITabProps;
6/** @deprecated use TabProps */
7export interface ITabProps extends Props, Omit<HTMLDivProps, "id" | "title" | "onClick"> {
8 /**
9 * Content of tab title, rendered in a list above the active panel.
10 * Can also be set via the `title` prop.
11 */
12 children?: React.ReactNode;
13 /**
14 * Whether the tab is disabled.
15 *
16 * @default false
17 */
18 disabled?: boolean;
19 /**
20 * Unique identifier used to control which tab is selected
21 * and to generate ARIA attributes for accessibility.
22 */
23 id: TabId;
24 /**
25 * Panel content, rendered by the parent `Tabs` when this tab is active.
26 * If omitted, no panel will be rendered for this tab.
27 */
28 panel?: JSX.Element;
29 /**
30 * Space-delimited string of class names applied to tab panel container.
31 */
32 panelClassName?: string;
33 /**
34 * Content of tab title element, rendered in a list above the active panel.
35 * Can also be set via React `children`.
36 */
37 title?: React.ReactNode;
38}
39export declare class Tab extends AbstractPureComponent2<TabProps> {
40 static defaultProps: Partial<TabProps>;
41 static displayName: string;
42 render(): JSX.Element;
43}