UNPKG

@szum-tech/design-system

Version:

Szum-Tech design system with tailwindcss support

58 lines (53 loc) 1.85 kB
import * as react_jsx_runtime from 'react/jsx-runtime'; import * as React from 'react'; import { VariantProps } from 'class-variance-authority'; import * as class_variance_authority_types from 'class-variance-authority/types'; type ButtonProps = React.ComponentProps<"button"> & { /** * Defines button full width */ fullWidth?: boolean; /** * Defines button variant */ variant?: ButtonVariantType; /** * Defines button size */ size?: ButtonSizeType; /** * Defines button content */ children?: React.ReactNode; /** * Disabled button */ disabled?: boolean; /** * Defines left icon */ startIcon?: React.ReactElement; /** * Defines right icon */ endIcon?: React.ReactElement; /** * Defines is button is in loading state */ loading?: boolean; /** * Defines is position of loading icon */ loadingPosition?: "start" | "end" | "center"; asChild?: boolean; }; declare function Button({ asChild, variant, disabled, fullWidth, loadingPosition: loadingPositionProp, children, type, loading, size, endIcon, startIcon, className, ...props }: ButtonProps): react_jsx_runtime.JSX.Element; declare const buttonVariants: (props?: ({ variant?: "link" | "secondary" | "outline" | "error" | "default" | "ghost" | null | undefined; size?: "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | undefined; fullWidth?: boolean | null | undefined; } & class_variance_authority_types.ClassProp) | undefined) => string; type ButtonCvaProps = VariantProps<typeof buttonVariants>; type ButtonSizeType = NonNullable<ButtonCvaProps["size"]>; type ButtonVariantType = NonNullable<ButtonCvaProps["variant"]>; export { Button, type ButtonProps, type ButtonSizeType, type ButtonVariantType };