@veracity/vui
Version:
Veracity UI is a React component library crafted for use within Veracity applications and pages. Based on Styled Components and @xstyled.
45 lines (44 loc) • 1.67 kB
TypeScript
import { ThemingProps } from "../theme/types.js";
import "../theme/index.js";
import { ChildrenProp } from "../core/types.js";
import { SystemProps } from "../system/system.js";
import "../system/index.js";
import "../core/index.js";
import { IconProp } from "../icon/icon.types.js";
import "../icon/index.js";
import { ReactNode } from "react";
//#region src/tabs/tabs.types.d.ts
type AnimationDirection = 'fadeLeft' | 'fadeRight' | 'fadeIn';
type TabsSize = 'md' | 'sm' | 'lg' | 'xl' | 'xxl';
type NavBarIconSize = 'md' | 'xs' | 'sm' | 'lg' | 'xl' | undefined;
type TabsProps = SystemProps & ThemingProps<'Tabs'> & ChildrenProp & {
actions?: ReactNode;
activeTabId?: number | string;
showBorder?: boolean;
onTabClick?: (id?: number | string) => void;
};
type TabProps = SystemProps & ChildrenProp & {
icon?: IconProp;
id?: number | string;
title: ReactNode;
disabled?: boolean;
className?: string;
onClick?: (nativeEvent?: React.MouseEvent<HTMLLIElement, MouseEvent>) => void;
/** If provided, displays a remove button with this function as onClick. */
onDelete?: (nativeEvent?: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
};
type TabIndexProps = TabProps & {
index?: number;
};
type TabNavBarProps = {
actions?: ReactNode;
tabs: TabIndexProps[];
onNavItemClick: (tabIndex: number, e: React.MouseEvent<HTMLLIElement, MouseEvent>) => void;
activeNavItem?: number | string;
animationDirection?: AnimationDirection;
showBorder?: boolean;
size?: TabsSize;
};
//#endregion
export { AnimationDirection, NavBarIconSize, TabIndexProps, TabNavBarProps, TabProps, TabsProps, TabsSize };
//# sourceMappingURL=tabs.types.d.ts.map