@campfire-interactive/shell-header 0.1.4 → 0.1.5
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 +3 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -153,7 +153,7 @@ function NotificationBell({ count = 0, onClick }) {
|
|
|
153
153
|
// src/UserMenu.tsx
|
|
154
154
|
import { useState as useState2, useRef as useRef2, useEffect as useEffect2 } from "react";
|
|
155
155
|
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
156
|
-
function UserMenu({ user, onLogout }) {
|
|
156
|
+
function UserMenu({ user, onLogout, color }) {
|
|
157
157
|
const [open, setOpen] = useState2(false);
|
|
158
158
|
const ref = useRef2(null);
|
|
159
159
|
useEffect2(() => {
|
|
@@ -171,6 +171,7 @@ function UserMenu({ user, onLogout }) {
|
|
|
171
171
|
"button",
|
|
172
172
|
{
|
|
173
173
|
className: "cfi-sh-avatar-btn",
|
|
174
|
+
style: color ? { background: color } : void 0,
|
|
174
175
|
onClick: () => setOpen(!open),
|
|
175
176
|
"aria-expanded": open,
|
|
176
177
|
"aria-haspopup": "true",
|
|
@@ -226,7 +227,7 @@ function ShellHeader({
|
|
|
226
227
|
/* @__PURE__ */ jsxs5("div", { className: "cfi-sh-right", children: [
|
|
227
228
|
/* @__PURE__ */ jsx5(NotificationBell, { count: notificationCount, onClick: onNotificationClick }),
|
|
228
229
|
/* @__PURE__ */ jsx5(AppSwitcher, { currentAppId: appId, authorizedApps }),
|
|
229
|
-
/* @__PURE__ */ jsx5(UserMenu, { user, onLogout })
|
|
230
|
+
/* @__PURE__ */ jsx5(UserMenu, { user, onLogout, color: currentApp?.color })
|
|
230
231
|
] })
|
|
231
232
|
] });
|
|
232
233
|
}
|