UNPKG

v12-ui

Version:

A React component library with a focus on utility-first design and accessibility.

20 lines (19 loc) 1.17 kB
import { ComponentPropsWithRef, ReactNode } from 'react'; import { WithoutSharedProperties } from '../utils/polymorphicTypes'; import { VariantProps } from 'class-variance-authority'; declare const button: (props?: ({ variant?: "error" | "primary" | "secondary" | "muted" | "accent" | "success" | "warning" | "info" | "ghost" | null | undefined; border?: boolean | null | undefined; shadow?: "error" | "default" | "success" | "warning" | "info" | null | undefined; rounded?: "circle" | "none" | "sm" | "md" | "lg" | "pill" | null | undefined; size?: "sm" | "md" | "lg" | "fit" | "full" | null | undefined; } & import('class-variance-authority/types').ClassProp) | undefined) => string; type AllowedTags = 'button' | 'a' & keyof React.JSX.IntrinsicElements; type PolymorphicProps<T extends AllowedTags = 'button'> = { as?: T; disabled?: boolean; children?: ReactNode; className?: string; } & WithoutSharedProperties<ComponentPropsWithRef<T>> & VariantProps<typeof button>; export declare const Button: import('react').ForwardRefExoticComponent<Omit<PolymorphicProps<AllowedTags>, "ref"> & import('react').RefAttributes<any>>; export {};