UNPKG

lune-ui-lib

Version:

Lune UI Components Library

32 lines (31 loc) 874 B
import type { SxProps } from '@mui/material'; import React, { FC } from 'react'; export interface ButtonProps { children?: React.ReactNode; variant?: ButtonVariant; sx?: SxProps; wide?: boolean; disabled?: boolean; iconButton?: boolean; leftIcon?: JSX.Element; rightIcon?: JSX.Element; onClick?: (f: React.MouseEvent<HTMLElement>) => void; type?: 'button' | 'submit' | 'reset'; /** * You're expected to provide something like * * ``` * <Loading light={variant === ButtonVariants.CONTAINED} /> * ``` * * here, if the button is in the loading state. */ loading?: React.ReactNode; loadingLabel?: string; light?: boolean; href?: string; target?: string; } type ButtonVariant = 'contained' | 'outlined' | 'text'; declare const Button: FC<ButtonProps>; export default Button;