@j2inn/app-react
Version:
React implementation of the j2inn-app framework
63 lines (62 loc) • 1.94 kB
TypeScript
import { TabsProps } from 'antd';
import React from 'react';
/**
* Is the interface that defines the properties for the header tab bar control
*/
export interface AppTabsProps {
/**
* Is an array of keys which specifies the various history states to
* be removed when a tab is clicked (selected)
* The app might be in a state that shows a specific UI (when in a tab view). When the tab
* is switched, all the UI state will need (if needed) to be reset for the new tab UI.
* The keys specified in the "current" property will insure that all those states are cleared.
*/
clearStates: string[];
/**
* Are the various UI (tab-bar) tabs
*/
tabOptions: {
/**
* The unique key which identifies the tab and the history state. This is *NOT* the
* label of the tab.
*/
name: string;
/**
* Is the locale key that pulls the label for the tab
*/
localeKey?: string;
/**
* Is the content of the tab
*/
content: React.ReactNode;
/**
* Is the tab icon
*/
icon?: React.ReactNode;
}[];
/**
* Specifies the extra UI elements that will be added to the left/right of the tab bar.
* @see https://ant.design/components/tabs/#API
*/
extra?: React.ReactNode | {
left?: React.ReactNode;
right?: React.ReactNode;
};
/**
* Is the CSS class for the tab-bar
*/
className?: string;
/**
* Properties of Ant Design Tab component
*/
tabsProps?: TabsProps;
}
/**
* The application view's tabs.
*
* This component will automatically update the history and address bar
* with the application the user has selected.
*/
export declare const AppViewTabs: (({ clearStates: tabStates, tabOptions, className, extra, tabsProps, }: AppTabsProps) => JSX.Element) & {
displayName: string;
};