UNPKG

@snowball-tech/fractal

Version:

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

35 lines (31 loc) 1.13 kB
import { AllHTMLAttributes, ReactNode, ElementType, MouseEvent, CSSProperties } from 'react'; import { breakpoints } from '@snowball-tech/design-tokens/dist/web/typescript/constants'; import { T as Themes } from '../constants-QFINMz1u.js'; import { Variants } from './Button.constants.js'; type Breakpoint = keyof typeof breakpoints; interface ButtonProps extends Omit<AllHTMLAttributes<HTMLElement>, 'onClick' | 'wrap'> { children?: ReactNode; disabled?: boolean; element?: ElementType; fullStyle?: boolean; fullWidth?: boolean; href?: string; icon?: ReactNode; iconHidden?: boolean | Breakpoint; iconOnly?: boolean | 'auto' | Breakpoint; iconPosition?: 'left' | 'right'; inlineStyle?: boolean; label?: string; target?: string; theme?: Themes; truncate?: boolean; type?: 'button' | 'reset' | 'submit'; underlined?: boolean; variant?: `${Variants}`; wrap?: boolean; onClick?: (event: MouseEvent<HTMLElement>) => void; wrapperClassName?: string; wrapperStyles?: CSSProperties; disableClickTracking?: boolean; } export type { ButtonProps };