import React from 'react'; import classnames from 'classnames'; import { BackgroundColor, BorderColor, TextColor, Display, JustifyContent, AlignItems, BorderRadius, TextVariant, TextTransform, } from '../../../helpers/constants/design-system'; import type { PolymorphicRef } from '../box'; import { Text } from '../text'; import type { TextProps } from '../text'; import { AvatarBaseComponent, AvatarBaseProps, AvatarBaseSize, } from './avatar-base.types'; export const AvatarBase: AvatarBaseComponent = React.forwardRef( ( { size = AvatarBaseSize.Md, children, backgroundColor = BackgroundColor.backgroundAlternative, borderColor = BorderColor.borderDefault, color = TextColor.textDefault, className = '', ...props }: AvatarBaseProps, ref?: PolymorphicRef, ) => { let fallbackTextVariant; if (size === AvatarBaseSize.Lg || size === AvatarBaseSize.Xl) { fallbackTextVariant = TextVariant.bodyLgMedium; } else if (size === AvatarBaseSize.Sm || size === AvatarBaseSize.Md) { fallbackTextVariant = TextVariant.bodySm; } else { fallbackTextVariant = TextVariant.bodyXs; } return ( )} > {children} ); }, );