react-elegant-ui
Version:
Elegant UI components, made by BEM best practices for react
43 lines (42 loc) • 1.1 kB
TypeScript
import { FC, ReactNode } from 'react';
import { IComponentHTMLElement } from '../../types/IComponent';
export interface PaneItem {
/**
* Unique id of tab
*
* If exists few items with same id, will shown only first matched item
*/
id?: string;
/**
* Content of tab
*/
content?: ReactNode;
/**
* Inactive state of tab
*/
disabled?: boolean;
}
export interface ITabsPanesProps extends IComponentHTMLElement<HTMLDivElement> {
/**
* Array of tabs.
*/
panes: PaneItem[];
/**
* ID of active tab.
*/
activePane?: string;
/**
* Render all tabs, even inactive
*
* It useful when you need keep state of panes content and for SEO purposes
*/
renderAll?: boolean;
}
export declare const cnTabsPanes: import("@bem-react/classname").ClassNameFormatter;
/**
* Component for making tabs with some contents.
* Switching between tabs can be implement for example with use `TabsMenu`, `Select`.
*
* @param {ITabsPanesProps} props
*/
export declare const TabsPanes: FC<ITabsPanesProps>;