UNPKG

@snowball-tech/fractal

Version:

Fractal's (Snowball's design system) React component library based on RadixUI and PandaCSS

36 lines (33 loc) 1.1 kB
import { AllHTMLAttributes, ReactNode } from 'react'; import { Orientations, Sizes, Positions } from './Tabs.constants.js'; interface TabsProps extends Omit<AllHTMLAttributes<HTMLDivElement>, 'defaultValue' | 'dir' | 'value'> { children: ReactNode; tabs: ReactNode; defaultTab?: string; dir?: 'ltr' | 'rtl'; disabled?: boolean; label?: string; large?: boolean; orientation?: `${Orientations}`; tab?: string; tabsPosition?: `${Positions}`; onTabChange?: (newTab: string) => void; } interface TabProps extends Omit<AllHTMLAttributes<HTMLButtonElement>, 'label' | 'size' | 'type' | 'value'> { name: string; children?: ReactNode; disabled?: boolean; icon?: ReactNode; iconOnly?: boolean; label?: string; large?: boolean; orientation?: `${Orientations}`; size?: `${Sizes}`; tabsPosition?: `${Positions}`; } interface TabContentProps extends Omit<AllHTMLAttributes<HTMLDivElement>, 'value'> { children: ReactNode; name: string; forceMount?: boolean; } export type { TabContentProps, TabProps, TabsProps };