import Icon from '../../common/Icon'; import ScreenReaderText from '../../common/ScreenReaderText'; import WrapperTag from '../../common/WrapperTag'; import { ButtonProps } from './types'; import clsx from 'clsx'; const Button = ({ buttonStyle, children, className, icon, hasLinkStyle, href, isIconLeft, isIconOnly = false, isSmall, type = 'button', width, ...props }: ButtonProps) => { // determine which HTML tag to use let tagName = 'button'; if (href) { tagName = 'a'; } return ( {isIconOnly ? {children} : children} {icon && } ) }; Button.displayName = 'Button'; export default Button;