alinea
Version:
[](https://npmjs.org/package/alinea) [](https://packagephobia.com/result?p=alinea)
30 lines (26 loc) • 1.34 kB
JavaScript
import "../../chunks/chunk-U5RRZUYZ.js";
// src/dashboard/view/WorkspaceLabel.tsx
import { HStack, Icon, TextLabel, fromModule } from "alinea/ui";
import { LogoShape } from "alinea/ui/branding/LogoShape";
import { RiFlashlightFill } from "alinea/ui/icons/RiFlashlightFill";
import { contrastColor } from "alinea/ui/util/ContrastColor";
// 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 = fromModule(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 ?? RiFlashlightFill }) }) }),
/* @__PURE__ */ jsx("div", { className: styles.root.label(), children: /* @__PURE__ */ jsx(TextLabel, { label }) })
] });
}
export {
WorkspaceLabel
};