UNPKG

@progress/kendo-react-layout

Version:

React Layout components enable you to create a perceptive and intuitive layout of web projects. KendoReact Layout package

51 lines (50 loc) 1.62 kB
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2026 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ import * as a from "react"; import o from "prop-types"; import { classNames as d, kendoThemeMaps as r } from "@progress/kendo-react-common"; import { avatarType as l } from "./interfaces/Enums.mjs"; const s = (t) => { const e = { type: l.TEXT, size: void 0, rounded: void 0, fillMode: void 0, themeColor: void 0, ...t }; return /* @__PURE__ */ a.createElement( "div", { style: e.style, className: d( "k-avatar", { "k-avatar-bordered": e.border, [`k-rounded-${r.roundedMap[e.rounded] || e.rounded}`]: e.rounded, [`k-avatar-${r.sizeMap[e.size] || e.size}`]: e.size, [`k-avatar-${e.fillMode}`]: e.fillMode, [`k-avatar-${e.themeColor}`]: !!e.themeColor }, e.className ) }, /* @__PURE__ */ a.createElement("span", { className: `k-avatar-${e.type}` }, e.children) ); }; s.propTypes = { className: o.string, type: o.oneOf(["text", "image", "icon"]), size: o.oneOf(["small", "medium", "large"]), rounded: o.oneOf(["small", "medium", "large", "full", "none"]), fillMode: o.oneOf(["solid", "outline"]), themeColor: o.oneOf(["base", "primary", "secondary", "tertiary"]) }; export { s as Avatar };