UNPKG

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