import classNames from 'classnames' import { CircularProgress } from 'components/common' import React, { ReactNode } from 'react' import styles from './Button.module.scss' interface Props { className?: any color?: 'primary' | 'secondary' | 'tertiary' | 'quaternary' disabled?: boolean externalLink?: string id?: string suffix?: ReactNode prefix?: ReactNode showProgressIndicator?: boolean size?: 'small' | 'medium' | 'large' styleOverride?: ButtonStyleOverride text?: string | ReactNode variant?: 'solid' | 'transparent' | 'round' onClick?: (e: any) => void } export const Button = React.forwardRef( ( { className = '', color = 'primary', disabled, externalLink, id = '', suffix, prefix, showProgressIndicator, size = 'small', styleOverride, text, variant = 'solid', onClick, }, ref, ) => { const Button = () => { const buttonClasses = classNames( styles.button, styles[size], styles[color], styles[variant], (disabled || showProgressIndicator) && styles.disabled, className, ) return ( ) } return externalLink ? ( {Button()} ) : ( Button() ) }, ) Button.displayName = 'Button'