UNPKG

@coconut-software/ui

Version:

React components for faster and easier web development.

40 lines (39 loc) 1.29 kB
import type { ReactNode, Ref } from 'react'; import type { ButtonSize, ButtonVariant } from '../Button/Button'; import type SvgIcon from '../SvgIcon/SvgIcon'; export type ButtonProps = { children?: ReactNode & { type?: { uiName?: string; }; }; color?: MenuButtonColor; dataSet?: Record<string, string | undefined>; disabled?: boolean; endAdornment?: typeof SvgIcon; icon: true; label: string; size?: ButtonSize; startAdornment?: typeof SvgIcon; tabIndex?: number; variant?: ButtonVariant; } | { children?: ReactNode & { type?: { uiName?: string; }; }; color?: MenuButtonColor; dataSet?: Record<string, string | undefined>; disabled?: boolean; endAdornment?: typeof SvgIcon; icon?: false; label?: never; size?: ButtonSize; startAdornment?: typeof SvgIcon; tabIndex?: number; variant?: ButtonVariant; }; type MenuButtonColor = 'danger' | 'default' | 'inverse' | 'primary' | 'secondary'; declare function Button({ children, color, dataSet, disabled, endAdornment, icon, label, size, startAdornment, tabIndex, variant, }: ButtonProps, ref: Ref<HTMLButtonElement>): JSX.Element; export default Button;