UNPKG

922 BTypeScriptView Raw
1import * as React from "react";
2import { AbstractPureComponent2 } from "../../common";
3import { TabProps, TabId } from "./tab";
4export declare type TabTitleProps = ITabTitleProps;
5/** @deprecated use TabTitleProps */
6export interface ITabTitleProps extends TabProps {
7 /** Handler invoked when this tab is clicked. */
8 onClick: (id: TabId, event: React.MouseEvent<HTMLElement>) => void;
9 /** ID of the parent `Tabs` to which this tab belongs. Used to generate ID for ARIA attributes. */
10 parentId: TabId;
11 /** Whether the tab is currently selected. */
12 selected: boolean;
13}
14export declare class TabTitle extends AbstractPureComponent2<TabTitleProps> {
15 static displayName: string;
16 render(): JSX.Element;
17 private handleClick;
18}
19export declare function generateTabPanelId(parentId: TabId, tabId: TabId): string;
20export declare function generateTabTitleId(parentId: TabId, tabId: TabId): string;