import React, { ButtonHTMLAttributes, MouseEvent, KeyboardEvent, PropsWithChildren } from 'react'; import classNames from 'classnames'; import { LoadingIndicator } from 'react-file-utils'; import { PropsWithElementAttributes } from '../utils'; export type ButtonProps = PropsWithChildren< PropsWithElementAttributes<{ buttonStyle?: 'info' | 'primary' | 'faded'; disabled?: boolean; loading?: boolean; onClick?: (event: MouseEvent) => void; onKeyPress?: (event: KeyboardEvent) => void; type?: ButtonHTMLAttributes['type']; }> >; export const Button = ({ buttonStyle = 'info', disabled = false, loading = false, type = 'button', onClick, onKeyPress, children, className, style, }: ButtonProps) => ( );