reablocks
Version:
Component library for React
53 lines (51 loc) • 1.49 kB
TypeScript
import { ButtonTheme } from './ButtonTheme';
import { default as React, FC, LegacyRef } from 'react';
export interface ButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'onAnimationStart' | 'onDragStart' | 'onDragEnd' | 'onDrag'> {
/**
* Color variation of the button.
*/
color?: 'default' | 'primary' | 'secondary' | 'error' | 'success' | 'warning' | string;
/**
* Style variant of the button.
*/
variant?: 'filled' | 'outline' | 'text' | string;
/**
* The size variation of the button.
*/
size?: 'small' | 'medium' | 'large' | string;
/**
* If true, the button will take up the full width of its container.
*/
fullWidth?: boolean;
/**
* If true, the margins of the button will be disabled.
*/
disableMargins?: boolean;
/**
* If true, the padding of the button will be disabled.
*/
disablePadding?: boolean;
/**
* If true, the animation of the button will be disabled.
*/
disableAnimation?: boolean;
/**
* Element to display before the Button content.
*/
startAdornment?: any;
/**
* Element to display after the Button content.
*/
endAdornment?: any;
/**
* Theme for the Button.
*/
theme?: ButtonTheme;
}
export interface ButtonRef {
/**
* The ref to the button element.
*/
ref?: LegacyRef<HTMLButtonElement>;
}
export declare const Button: FC<ButtonProps & ButtonRef>;