UNPKG

design-react-kit

Version:

Componenti React per Bootstrap 5

15 lines 673 B
import classNames from 'classnames'; import React from 'react'; export const AvatarIcon = ({ className, tag = 'div', size = 'md', href, color, innerRef, testId, children, ...attributes }) => { const Tag = tag; const typeClass = classNames('avatar', { [`size-${size}`]: size, [`avatar-${color}`]: color, className }); if (href) { return (React.createElement("a", { href: href, ...attributes, className: typeClass, ref: innerRef, "data-testid": testId }, children)); } return (React.createElement(Tag, { ...attributes, className: typeClass, "data-testid": testId }, children)); }; //# sourceMappingURL=AvatarIcon.js.map