@landtrustinc/design-system 1.2.47 → 1.2.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6131,19 +6131,21 @@ var MessageBubble = ({
|
|
|
6131
6131
|
className,
|
|
6132
6132
|
children
|
|
6133
6133
|
}) => {
|
|
6134
|
-
const hasAvatar = !!avatarSrc;
|
|
6134
|
+
const hasAvatar = !!avatarSrc || !!author;
|
|
6135
|
+
const firstName = author == null ? void 0 : author.split(" ")[0];
|
|
6135
6136
|
return /* @__PURE__ */ (0, import_jsx_runtime226.jsx)("div", { className, css: getRootStyles(variant), children: /* @__PURE__ */ (0, import_jsx_runtime226.jsxs)("div", { css: getOuterWrapperStyles(variant), children: [
|
|
6136
6137
|
hasAvatar && /* @__PURE__ */ (0, import_jsx_runtime226.jsx)("div", { css: avatarWrapperStyles, children: /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
|
|
6137
6138
|
Avatar_default,
|
|
6138
6139
|
{
|
|
6139
|
-
type: "image",
|
|
6140
|
+
type: avatarSrc ? "image" : "text",
|
|
6140
6141
|
src: avatarSrc,
|
|
6142
|
+
text: author,
|
|
6141
6143
|
alt: author || "Avatar",
|
|
6142
6144
|
size: "md"
|
|
6143
6145
|
}
|
|
6144
6146
|
) }),
|
|
6145
6147
|
/* @__PURE__ */ (0, import_jsx_runtime226.jsxs)("div", { css: contentWrapperStyles, children: [
|
|
6146
|
-
|
|
6148
|
+
firstName && /* @__PURE__ */ (0, import_jsx_runtime226.jsx)("div", { css: getHeaderStyles(variant), children: /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(Text_default, { size: "sm", fontWeight: "semibold", color: "var(--text-primary)", children: firstName }) }),
|
|
6147
6149
|
/* @__PURE__ */ (0, import_jsx_runtime226.jsxs)("div", { css: getBubbleStyles(variant), children: [
|
|
6148
6150
|
/* @__PURE__ */ (0, import_jsx_runtime226.jsx)("div", { css: contentStyles, children }),
|
|
6149
6151
|
timestamp && /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
|