UNPKG

@snowball-tech/fractal

Version:

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

59 lines (52 loc) 2.01 kB
import * as react from 'react'; import { AllHTMLAttributes, ReactNode } from 'react'; declare enum Orientations { Horizontal = "horizontal", Vertical = "vertical" } declare const DEFAULT_ORIENTATION = Orientations.Horizontal; declare enum Positions { End = "end", Start = "start" } declare const DEFAULT_POSITION = Positions.Start; declare enum Sizes { Large = "large", Medium = "medium", Small = "small" } declare const DEFAULT_SIZE = Sizes.Small; 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; } declare const Tab: react.ForwardRefExoticComponent<TabProps & react.RefAttributes<HTMLButtonElement>>; declare const TabContent: react.ForwardRefExoticComponent<TabContentProps & react.RefAttributes<HTMLDivElement>>; declare const Tabs: react.ForwardRefExoticComponent<TabsProps & react.RefAttributes<HTMLDivElement>>; export { DEFAULT_ORIENTATION as DEFAULT_TABS_ORIENTATION, DEFAULT_POSITION as DEFAULT_TABS_POSITION, DEFAULT_SIZE as DEFAULT_TAB_SIZE, Tab, TabContent, type TabContentProps, type TabProps, Sizes as TabSizes, Tabs, Orientations as TabsOrientations, Positions as TabsPositions, type TabsProps };