@loafmarkets/ui 0.0.3 → 0.0.4

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.mjs CHANGED
@@ -1293,7 +1293,8 @@ var YourOrders = React5.forwardRef(
1293
1293
  ] }),
1294
1294
  orders.length === 0 ? /* @__PURE__ */ jsx("div", { className: "py-10 text-center text-sm text-white/50", children: "No orders" }) : /* @__PURE__ */ jsx("div", { children: orders.map((order) => {
1295
1295
  const sideClass = order.side === "buy" ? "text-[#0ecb81]" : "text-[#f6465d]";
1296
- const filled = clampPct(order.filledPercent);
1296
+ const filled = clampPct(order.filledPercent ?? 0);
1297
+ const isCancelled = order.status?.toUpperCase() === "CANCELLED";
1297
1298
  const canEditPrice = Boolean(onEditPrice);
1298
1299
  const canEditAmount = Boolean(onEditAmount);
1299
1300
  const canCancel = Boolean(onCancel);
@@ -1351,7 +1352,7 @@ var YourOrders = React5.forwardRef(
1351
1352
  ] }),
1352
1353
  /* @__PURE__ */ jsx("div", { className: "mt-1 h-1 w-4/5 overflow-hidden rounded-sm bg-white/10", children: /* @__PURE__ */ jsx("div", { className: "h-full rounded-sm bg-[#C9A227]", style: { width: `${filled}%` } }) })
1353
1354
  ] }),
1354
- /* @__PURE__ */ jsx("div", { className: "px-2 text-center", children: /* @__PURE__ */ jsx(
1355
+ /* @__PURE__ */ jsx("div", { className: "px-2 text-center", children: isCancelled ? /* @__PURE__ */ jsx("span", { className: "inline-flex items-center justify-center rounded border border-white/20 px-3 py-1 text-[0.78rem] uppercase tracking-wide text-[#f6465d]", children: "Cancelled" }) : /* @__PURE__ */ jsx(
1355
1356
  "button",
1356
1357
  {
1357
1358
  type: "button",