lucid-ui
Version:
A UI component library from Xandr.
95 lines • 3.31 kB
TypeScript
import React from 'react';
import PropTypes from 'prop-types';
import { Overwrite, StandardProps } from '../../util/component-types';
import * as reducers from './VerticalTabs.reducers';
import { IVerticalListMenuItemProps } from '../VerticalListMenu/VerticalListMenu';
/** Vertical Tabs Tab Child Component */
export 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: {
/**
Class names that are appended to the defaults.
*/
className: PropTypes.Requireable<string>;
/**
Indicates which of the \`VerticalTabs.Tab\` children is currently
selected. The index of the last \`VerticalTabs.Tab\` child with
\`isSelected\` equal to \`true\` takes precedence over this prop.
*/
selectedIndex: PropTypes.Requireable<number>;
/**
Callback for when the user clicks a tab. Called with the index of the tab
that was clicked. Signature: \`(index, { event, props}) => {}\`
*/
onSelect: PropTypes.Requireable<(...args: any[]) => 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: {
/**
Determines if the Tab is selected.
*/
isSelected: PropTypes.Requireable<boolean>;
};
};
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<IVerticalTabsProps, IVerticalTabsState>;
export default _default;
export { VerticalTabs as VerticalTabsDumb };
//# sourceMappingURL=VerticalTabs.d.ts.map