import React from "react"; import { TabContext } from "./TabContainer"; import { ICancellableEvent } from "../Misc"; interface ITabProps { /** Name to show in the tab header. */ header: string | React.ReactNode; /** Name used for binding to selected tab. */ id?: string; /** Name used for binding to selected tab. (Same as id property) */ name?: string; /** Icon to display in tab header. */ icon?: any; /** True if the tab is disabled and not allowed to be clicked on. */ disabled?: boolean; /** * Callback to run when this tab is first displayed, or when TabManager.reset is called with reInitialise=true */ onInitialise?: () => void; /** * Callback to run whenever this tab is displayed. */ onDisplayed?: () => void; /** Callback to run when selecting a different tab. The event can be cancelled. */ onLeave?: (e: ICancellableEvent) => void; /** Child content is used as the tab body. */ children: React.ReactNode; } export default class Tab extends React.Component { static contextType: React.Context; context: React.ContextType; private isHeader?; private tabKey; private hasRenderedContents; private iconFactory; constructor(props: ITabProps); componentDidMount(): void; render(): false | React.JSX.Element; onClick(e: React.MouseEvent): void; renderHeader(isSelected: boolean): React.JSX.Element; renderBody(isSelected: boolean): false | React.JSX.Element; } export {};