import React from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; import { AvatarBase } from '../avatar-base'; import Box from '../../ui/box/box'; import { ICON_NAMES, Icon } from '../icon'; import { COLORS, BORDER_COLORS, SIZES, DISPLAY, ALIGN_ITEMS, JUSTIFY_CONTENT, } from '../../../helpers/constants/design-system'; export const AvatarFavicon = ({ size = SIZES.MD, imageSource, imgAlt = 'avatar-favicon', className, fallbackIconProps, borderColor = BORDER_COLORS.TRANSPARENT, ...props }) => { return ( {imageSource ? ( {imgAlt} ) : ( )} ); }; AvatarFavicon.propTypes = { /** * The imageSource accepts the string of the image to be rendered */ imageSource: PropTypes.string, /** * The alt text for the favicon avatar to be rendered */ imgAlt: PropTypes.string, /** * Props for the fallback icon. All Icon props can be used */ fallbackIconProps: PropTypes.shape(Icon.PropTypes), /** * The size of the AvatarFavicon * Possible values could be 'SIZES.XS', 'SIZES.SM', 'SIZES.MD', 'SIZES.LG', 'SIZES.XL' * Defaults to SIZES.MD */ size: PropTypes.oneOf(Object.values(SIZES)), /** * The border color of the AvatarFavicon * Defaults to COLORS.TRANSPARENT */ borderColor: Box.propTypes.borderColor, /** * Additional classNames to be added to the AvatarFavicon */ className: PropTypes.string, /** * AvatarFavicon also accepts all Box props including but not limited to * className, as(change root element of HTML element) and margin props */ ...Box.propTypes, };