apphouse
Version:
Component library for React that uses observable state management and theme-able components.
52 lines (51 loc) • 1.58 kB
TypeScript
import { CSSProperties } from 'glamor';
import { BoxSizeStyles, ButtonStyleVariant } from '../styles/defaults/themes.interface';
import { TabViewModel } from '../app/tabs/TabViewModel';
import { ApphouseComponent } from './component.interfaces';
import React from 'react';
/**
* Interface for styles to be applied to the tab view component
*/
export interface TabViewStyles {
container?: CSSProperties;
tabsContainer?: CSSProperties;
tabButton?: CSSProperties;
tabContent?: CSSProperties;
}
/**
* Interface for the TabView component
*/
export interface TabViewProps extends ApphouseComponent<TabViewStyles> {
/**
* The tab view Model
* @example new TabView()
*/
tabView: TabViewModel;
/**
* The content of the tab view.
* @optional the tab will render the content of the tab view by default,
* this will be rendered in addition to the content provided by the tab
*/
children?: React.ReactNode;
/**
* The variant for the styles to be applied on the tab button
* @default "clear"
*/
variant?: keyof ButtonStyleVariant;
/**
* The variant for the styles to be applied on the tab button when the tab is selected
* @default "tab"
*/
variantSelected?: keyof ButtonStyleVariant;
/**
* The size for the tab buttons
* @default "m"
*/
size?: keyof BoxSizeStyles;
}
/**
* A tab view component.
* It displays content in tabs.
* The tabs are displayed based on a TabViewModel passed in the props.
*/
export declare const TabView: React.FC<TabViewProps>;