UNPKG

react-tailwind-component-library

Version:
55 lines 1.56 kB
import React from 'react'; import * as icons from '../../icons'; declare const sizes: readonly ["compact", "default", "large"]; declare const variants: readonly ["default", "fade", "brand"]; declare const types: readonly ["button", "submit", "reset"]; export interface ButtonProps extends React.ComponentPropsWithoutRef<'button'> { /** * Defines size of the button */ size?: typeof sizes[number]; /** * Defines if the button needs to have a minimum width (in px) * Else manages size according to content */ minWidth?: number; /** * Defines variant of the button */ variant?: typeof variants[number]; /** * Defines icon to be shown on left side of text */ iconLeft?: keyof typeof icons; /** * Defines icon to be shown on right side of text */ iconRight?: keyof typeof icons; /** * Defines when button expands to full width of parent */ block?: boolean; /** * Defines when button is disabled */ disabled?: boolean; /** * Any additional classname to be applied to button */ className?: string; /** * Type asscoiated with button */ type?: typeof types[number]; /** * Defines when button is in loading state */ isLoading?: boolean; /** * Attributes to Cypress integration */ 'data-cy'?: string; } declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>; export default Button; //# sourceMappingURL=Button.d.ts.map