alinea
Version:
Headless git-based CMS
33 lines (29 loc) • 1.39 kB
JavaScript
import {
dist_default
} from "../../chunks/chunk-A5O3N2GS.js";
import "../../chunks/chunk-NZLE2WMY.js";
// src/dashboard/view/WorkspaceLabel.tsx
import { HStack, Icon, TextLabel } from "alinea/ui";
import { LogoShape } from "alinea/ui/branding/LogoShape";
import { contrastColor } from "alinea/ui/util/ContrastColor";
import { AlineaLogo } from "./AlineaLogo.js";
// src/dashboard/view/WorkspaceLabel.module.scss
var WorkspaceLabel_module_default = {
"root": "alinea-WorkspaceLabel",
"root-logo": "alinea-WorkspaceLabel-logo",
"rootLogo": "alinea-WorkspaceLabel-logo",
"root-label": "alinea-WorkspaceLabel-label",
"rootLabel": "alinea-WorkspaceLabel-label"
};
// src/dashboard/view/WorkspaceLabel.tsx
import { jsx, jsxs } from "react/jsx-runtime";
var styles = dist_default(WorkspaceLabel_module_default);
function WorkspaceLabel({ label, color, icon }) {
return /* @__PURE__ */ jsxs(HStack, { center: true, gap: 8, className: styles.root(), children: [
/* @__PURE__ */ jsx("div", { className: styles.root.logo(), children: /* @__PURE__ */ jsx(LogoShape, { foreground: contrastColor(color), background: color, children: /* @__PURE__ */ jsx(Icon, { icon: icon ?? /* @__PURE__ */ jsx(AlineaLogo, {}) }) }) }),
/* @__PURE__ */ jsx("div", { className: styles.root.label(), children: /* @__PURE__ */ jsx(TextLabel, { label }) })
] });
}
export {
WorkspaceLabel
};