import React, { Ref } from 'react'; import { AvocadoThemeProps, Shape } from '../../utils/types'; /** * Button - Renders a clickable item to the browser */ declare const Button: React.ForwardRefExoticComponent & React.RefAttributes>; export declare type ButtonSize = 'sm' | 'md' | 'lg'; export declare type ButtonType = 'solid' | 'outline' | 'link' | 'ghost'; export declare type ButtonVariant = 'primary' | 'warning' | 'error' | 'success'; export interface ButtonProps extends Omit, 'css'>, AvocadoThemeProps { /** * default type of button. Can be submit, button, reset */ buttonType?: ButtonType; /** * size of button. Can be sm, lg, md */ size?: ButtonSize; /** * shape of the button. can be round, border, square */ shape?: Shape; /** * trim text on button if more than specified length */ trim?: number; /** * variant of button. Can be primary, seconary, warning, error, link, ghost */ variant?: ButtonVariant; /** * loading state of button. When set to true, loading spinner is shown */ loading?: boolean; /** * prefix. Show element to the left of the button */ prefixIcon?: React.ReactNode; /** * prefix. Show element to the right of the button */ suffixIcon?: React.ReactNode; /** * ref. used for directly controlling dom element */ ref?: Ref; /** * fullWidth - control horizontal size of the Button. If set to true, button, spans full horizontal width */ fullWidth?: boolean; } export { Button };