@deframe-sdk/components 0.1.73 → 0.1.74
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.d.mts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +16 -13
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +16 -13
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -8342,14 +8342,6 @@ function AdvancedPanelContent({ advancedSettings, transactionDetails }) {
|
|
|
8342
8342
|
]
|
|
8343
8343
|
}
|
|
8344
8344
|
),
|
|
8345
|
-
transactionDetails.exchangeRateFormatted && /* @__PURE__ */ jsx(
|
|
8346
|
-
"p",
|
|
8347
|
-
{
|
|
8348
|
-
"data-test-id": "swap-form-simple-advanced-panel-subtitle",
|
|
8349
|
-
className: "text-[13px] text-[color:var(--deframe-widget-color-text-secondary)] m-0 mb-[var(--deframe-widget-size-gap-sm)] leading-[1.4] font-[inherit]",
|
|
8350
|
-
children: transactionDetails.exchangeRateFormatted
|
|
8351
|
-
}
|
|
8352
|
-
),
|
|
8353
8345
|
/* @__PURE__ */ jsx(
|
|
8354
8346
|
"div",
|
|
8355
8347
|
{
|
|
@@ -8358,9 +8350,15 @@ function AdvancedPanelContent({ advancedSettings, transactionDetails }) {
|
|
|
8358
8350
|
}
|
|
8359
8351
|
),
|
|
8360
8352
|
/* @__PURE__ */ jsx(DetailRow, { label: transactionDetails.labels.exchangeRateLabel, value: transactionDetails.exchangeRateFormatted }),
|
|
8361
|
-
/* @__PURE__ */ jsx(DetailRow, { label: transactionDetails.labels.blockchainCostsLabel, value: transactionDetails.totalCostFormatted }),
|
|
8362
|
-
/* @__PURE__ */ jsx(
|
|
8363
|
-
|
|
8353
|
+
/* @__PURE__ */ jsx(DetailRow, { label: transactionDetails.labels.blockchainCostsLabel, value: `- ${transactionDetails.totalCostFormatted}`, valueColor: "negative" }),
|
|
8354
|
+
/* @__PURE__ */ jsx(
|
|
8355
|
+
DetailRow,
|
|
8356
|
+
{
|
|
8357
|
+
label: transactionDetails.labels.priceImpactLabel,
|
|
8358
|
+
value: transactionDetails.priceImpactFormatted,
|
|
8359
|
+
valueColor: transactionDetails.priceImpactIsPositive ? "positive" : "negative"
|
|
8360
|
+
}
|
|
8361
|
+
),
|
|
8364
8362
|
/* @__PURE__ */ jsx(
|
|
8365
8363
|
SlippageDetailRow,
|
|
8366
8364
|
{
|
|
@@ -8377,7 +8375,12 @@ function AdvancedPanelContent({ advancedSettings, transactionDetails }) {
|
|
|
8377
8375
|
}
|
|
8378
8376
|
);
|
|
8379
8377
|
}
|
|
8380
|
-
|
|
8378
|
+
var valueColorClassNames = {
|
|
8379
|
+
default: "text-[color:var(--deframe-widget-color-text-primary)]",
|
|
8380
|
+
negative: "text-[color:var(--deframe-widget-color-state-error)]",
|
|
8381
|
+
positive: "text-[color:var(--deframe-widget-color-state-success)]"
|
|
8382
|
+
};
|
|
8383
|
+
function DetailRow({ label, value, valueColor = "default" }) {
|
|
8381
8384
|
if (!label && !value) return null;
|
|
8382
8385
|
return /* @__PURE__ */ jsxs(
|
|
8383
8386
|
"div",
|
|
@@ -8397,7 +8400,7 @@ function DetailRow({ label, value }) {
|
|
|
8397
8400
|
"span",
|
|
8398
8401
|
{
|
|
8399
8402
|
"data-test-id": "swap-form-simple-detail-row-value",
|
|
8400
|
-
className: "text-[13px] [font-weight:var(--deframe-widget-font-weight-semibold)] text-right font-[var(--deframe-widget-font-family)]
|
|
8403
|
+
className: twMerge("text-[13px] [font-weight:var(--deframe-widget-font-weight-semibold)] text-right font-[var(--deframe-widget-font-family)]", valueColorClassNames[valueColor]),
|
|
8401
8404
|
children: value
|
|
8402
8405
|
}
|
|
8403
8406
|
)
|