import React from 'react'; import classnames from 'classnames'; import { AlignItems, BackgroundColor, BorderRadius, Display, IconColor, JustifyContent, } from '../../../helpers/constants/design-system'; import Box from '../../ui/box'; import { Icon, IconSize } from '../icon'; import { ButtonIconSize, ButtonIconProps } from './button-icon.types'; const buttonIconSizeToIconSize: Record = { [ButtonIconSize.Sm]: IconSize.Sm, [ButtonIconSize.Md]: IconSize.Md, [ButtonIconSize.Lg]: IconSize.Lg, }; export const ButtonIcon = React.forwardRef( ( { ariaLabel, as = 'button', className = '', color = IconColor.iconDefault, href, size = ButtonIconSize.Lg, iconName, disabled, iconProps, ...props }: ButtonIconProps, ref: React.Ref, ) => { const Tag = href ? 'a' : as; const isDisabled = disabled && Tag === 'button'; return ( ); }, );