@kloudlite/design-system
Version:
A design system for building ambitious products.
30 lines (29 loc) • 898 B
TypeScript
import React, { ReactNode } from 'react';
type TabSizes = 'md' | 'sm' | (string & NonNullable<unknown>);
type TabVariant = 'filled' | 'plain' | (string & NonNullable<unknown>);
interface IBase {
to?: string;
fitted?: boolean;
LinkComponent?: any;
variant?: TabVariant;
size?: TabSizes;
}
interface ITabs<T = string> extends Omit<IBase, 'to'> {
onChange?: (item: T) => void;
value: T;
className?: string;
basePath?: string;
children: ReactNode;
toLabel?: string;
}
export interface ITab<T = string> {
to?: string;
label: ReactNode | ((active: boolean) => ReactNode);
prefix?: JSX.Element;
value: T;
}
declare const Tabs: {
Tab: <T>({ to, label, prefix, value: _ }: ITab<T>) => import("react/jsx-runtime").JSX.Element;
Root: React.ForwardRefExoticComponent<ITabs<any> & React.RefAttributes<HTMLDivElement>>;
};
export default Tabs;