@loafmarkets/ui 0.0.7 → 0.0.8

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
@@ -1554,7 +1554,7 @@ var formatPercent = (value, fractionDigits = 2) => {
1554
1554
  return `${value.toFixed(fractionDigits)}%`;
1555
1555
  };
1556
1556
  var YourOrders = React5.forwardRef(
1557
- ({ className, title = "Portfolio Holdings (Demo)", orders, ...props }, ref) => {
1557
+ ({ className, title = "Portfolio Holdings (Demo)", orders, renderOrderActions, ...props }, ref) => {
1558
1558
  const [activeTab, setActiveTab] = React5.useState("portfolio");
1559
1559
  const hasOrders = Array.isArray(orders) && orders.length > 0;
1560
1560
  const renderPortfolio = () => {
@@ -1586,7 +1586,7 @@ var YourOrders = React5.forwardRef(
1586
1586
  const currentPrice = order.currentPrice ?? order.price;
1587
1587
  const priceChangePercent = order.priceChangePercent ?? order.pnlPercent;
1588
1588
  const priceChangePositive = order.priceChangePositive ?? (priceChangePercent != null ? priceChangePercent >= 0 : void 0);
1589
- return /* @__PURE__ */ jsxs("div", { style: rowStyle, children: [
1589
+ return /* @__PURE__ */ jsxs("div", { style: { ...rowStyle, gridTemplateColumns: renderOrderActions ? "1.8fr 0.8fr 0.7fr 0.8fr 0.8fr 0.9fr 0.8fr" : "1.8fr 0.9fr 0.7fr 0.8fr 0.8fr 1fr" }, children: [
1590
1590
  /* @__PURE__ */ jsxs("div", { style: { display: "flex", gap: "1rem", alignItems: "center" }, children: [
1591
1591
  /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "0.15rem" }, children: [
1592
1592
  /* @__PURE__ */ jsx("div", { style: { fontSize: "0.9rem", fontWeight: 500 }, children: propertyName }),
@@ -1657,7 +1657,8 @@ var YourOrders = React5.forwardRef(
1657
1657
  ] }) : null
1658
1658
  ]
1659
1659
  }
1660
- )
1660
+ ),
1661
+ renderOrderActions ? /* @__PURE__ */ jsx("div", { style: { display: "flex", justifyContent: "flex-end" }, children: renderOrderActions(order) }) : null
1661
1662
  ] }, order.id);
1662
1663
  }) })
1663
1664
  ] });