UNPKG

react-avatar-gradient

Version:

A customizable React component for creating avatars with dynamic gradients and initials.

11 lines (10 loc) 651 B
import React from "react"; import { Avatar } from "./Avatar"; export var AvatarGroup = function (_a) { var avatars = _a.avatars, _b = _a.size, size = _b === void 0 ? 40 : _b, _c = _a.shape, shape = _c === void 0 ? "circle" : _c, color = _a.color; return (React.createElement("div", { style: { display: "flex" } }, avatars.map(function (title, index) { return (React.createElement("div", { key: index, style: { transform: "translateX(".concat(index * 5, "px)"), marginLeft: index === 0 ? 0 : "-12px", } }, React.createElement(Avatar, { title: title, size: size, shape: shape, color: color }))); }))); };