reablocks
Version:
Component library for React
55 lines (54 loc) • 1.57 kB
TypeScript
import { default as React, FC, LegacyRef } from 'react';
import { ButtonTheme } from './ButtonTheme';
export interface ButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'onAnimationStart' | 'onDragStart' | 'onDragEnd' | 'onDrag'> {
/**
* Color variation of the button.
* @default 'default'
*/
color?: 'default' | 'primary' | 'secondary' | 'error' | 'success' | 'warning' | string;
/**
* Style variant of the button.
* @default 'filled'
*/
variant?: 'filled' | 'outline' | 'text' | string;
/**
* The size variation of the button.
* @default 'medium'
*/
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.
*/
start?: React.ReactNode;
/**
* Element to display after the Button content.
*/
end?: React.ReactNode;
/**
* 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>;