UNPKG

@codex-storage/marketplace-ui-components

Version:
26 lines (25 loc) 898 B
import { jsxs as o, jsx as e } from "react/jsx-runtime"; import '../../assets/SpaceAllocation.css';function n({ data: c }) { const r = c.reduce((l, i) => l + i.size, 0); return /* @__PURE__ */ o("div", { className: "space-allocation", children: [ /* @__PURE__ */ e("header", { children: c.map((l) => /* @__PURE__ */ e( "span", { className: `${l.className || ""}`, style: { width: l.size / r * 100 + "%", backgroundColor: l.color } }, l.title )) }), /* @__PURE__ */ e("ul", { children: c.map((l) => /* @__PURE__ */ o("li", { children: [ /* @__PURE__ */ e("span", { style: { backgroundColor: l.color } }), /* @__PURE__ */ e("p", { children: /* @__PURE__ */ e("span", { children: l.title }) }) ] }, l.title)) }) ] }); } export { n as SpaceAllocation }; //# sourceMappingURL=SpaceAllocation.js.map