lucid-ui
Version:
A UI component library from AppNexus.
72 lines (71 loc) • 2.55 kB
TypeScript
import React from 'react';
import { Overwrite, StandardProps } from '../../util/component-types';
import * as reducers from './VerticalTabs.reducers';
import { IVerticalListMenuItemProps } from '../VerticalListMenu/VerticalListMenu';
/** Vertical Tabs Tab Child Component */
interface IVerticalTabsTabProps extends StandardProps {
/** Determines if the Tab is selected */
isSelected?: boolean;
/** Custom title for the tab */
Title?: string;
}
/** Vertical Tabs Component */
interface IVerticalTabsPropsRaw extends StandardProps {
/** Custom Tab component (alias for `VerticalTabs.Tab`) */
Tab?: React.ReactNode;
/** Custom Title component (alias for `VerticalTabs.Title`) */
Title?: React.ReactNode;
/** Indicates which of the \`VerticalTabs.Tab\` children is currently
selected */
selectedIndex: number;
/** Callback fired when the user selects a \`VerticalListMenu.Item\`.*/
onSelect: (index: number, { event, props, }: {
event: React.MouseEvent;
props: IVerticalListMenuItemProps;
}) => void;
}
export declare type IVerticalTabsProps = Overwrite<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, IVerticalTabsPropsRaw>;
export interface IVerticalTabsState {
selectedIndex: number;
}
declare class VerticalTabs extends React.Component<IVerticalTabsProps, IVerticalTabsState> {
static displayName: string;
static propTypes: {
className: any;
selectedIndex: any;
onSelect: any;
};
static defaultProps: {
selectedIndex: number;
onSelect: (...args: any[]) => void;
};
static reducers: typeof reducers;
static Tab: {
(_props: IVerticalTabsTabProps): null;
displayName: string;
peek: {
description: string;
};
propName: string;
propTypes: {
isSelected: any;
};
};
static Title: {
(_props: StandardProps): null;
displayName: string;
peek: {
description: string;
};
propName: string;
};
static peek: {
description: string;
categories: string[];
madeFrom: string[];
};
render(): React.ReactNode;
}
declare const _default: typeof VerticalTabs & import("../../util/state-management").IHybridComponent<Overwrite<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, IVerticalTabsPropsRaw>, IVerticalTabsState>;
export default _default;
export { VerticalTabs as VerticalTabsDumb };