@hyperbridge/ui 0.0.15 → 0.0.16
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 +1 -1
- package/dist/index.mjs +3 -4
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -653,9 +653,9 @@ declare function AssetValueTrend(props: {
|
|
|
653
653
|
dollarValue: number;
|
|
654
654
|
}): react_jsx_runtime.JSX.Element;
|
|
655
655
|
declare function Balance(props: {
|
|
656
|
+
amount: number;
|
|
656
657
|
prefix?: string;
|
|
657
658
|
suffix?: string;
|
|
658
|
-
amount: number;
|
|
659
659
|
formatter?: Intl.NumberFormat;
|
|
660
660
|
}): react_jsx_runtime.JSX.Element;
|
|
661
661
|
|
package/dist/index.mjs
CHANGED
|
@@ -3849,9 +3849,8 @@ var currencyFormat = new Intl.NumberFormat("en-US", {
|
|
|
3849
3849
|
});
|
|
3850
3850
|
function Balance(props) {
|
|
3851
3851
|
const { prefix = "$", suffix = "", formatter = currencyFormat } = props;
|
|
3852
|
-
const [int_, decimal] = String(props.amount).split(".");
|
|
3853
|
-
const int = Number.isNaN(+int_) ? 0 : int_;
|
|
3854
3852
|
const is_zero = props.amount === 0;
|
|
3853
|
+
const [int_, fraction] = formatter.format(props.amount).split(".");
|
|
3855
3854
|
return /* @__PURE__ */ jsx40("div", { className: "select-none", children: /* @__PURE__ */ jsxs28("span", { className: "text-[2.375rem] font-medium leading-[2.875rem] whitespace-nowrap", children: [
|
|
3856
3855
|
/* @__PURE__ */ jsxs28(
|
|
3857
3856
|
"span",
|
|
@@ -3861,13 +3860,13 @@ function Balance(props) {
|
|
|
3861
3860
|
),
|
|
3862
3861
|
children: [
|
|
3863
3862
|
prefix,
|
|
3864
|
-
|
|
3863
|
+
int_
|
|
3865
3864
|
]
|
|
3866
3865
|
}
|
|
3867
3866
|
),
|
|
3868
3867
|
/* @__PURE__ */ jsxs28("span", { className: "text-brand-black-100", children: [
|
|
3869
3868
|
".",
|
|
3870
|
-
|
|
3869
|
+
fraction != null ? fraction : "00"
|
|
3871
3870
|
] }),
|
|
3872
3871
|
/* @__PURE__ */ jsxs28("span", { className: "text-brand-white-500", children: [
|
|
3873
3872
|
"\xA0",
|