@hyperbridge/ui 0.0.11 → 0.0.12

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 CHANGED
@@ -382,7 +382,7 @@ declare function ReviewItem(props: {
382
382
  asset: {
383
383
  amount: string;
384
384
  symbol: string;
385
- secondaryValue: string;
385
+ secondaryValue: React__default.ReactNode;
386
386
  };
387
387
  AddressInfo: (props: {
388
388
  tag: string;
@@ -829,8 +829,12 @@ interface TokenSelectorProps {
829
829
  onAddToWallet?: (token: Token) => void;
830
830
  }
831
831
  declare const TokenSelector: ({ title, isOpen, onClose, allTokens, availableTokens, selectedToken, onTokenSelect, onAddToWallet, }: TokenSelectorProps) => react_jsx_runtime.JSX.Element;
832
+ interface TokenItem extends Pick<Token, "name" | "symbol" | "image" | "address"> {
833
+ amount: React__default.ReactNode;
834
+ secondaryAmount: React__default.ReactNode;
835
+ }
832
836
  declare function TokenSelectionItem(props: {
833
- token: Pick<Token, "name" | "symbol" | "image" | "amount" | "address" | "usdValue">;
837
+ token: TokenItem;
834
838
  isActive: boolean;
835
839
  isAvailable: boolean;
836
840
  AddWalletButton: React__default.ReactNode;
package/dist/index.mjs CHANGED
@@ -1803,7 +1803,7 @@ var TokenSelector = ({
1803
1803
  return /* @__PURE__ */ jsx21(
1804
1804
  TokenSelectionItem,
1805
1805
  {
1806
- token,
1806
+ token: __spreadProps(__spreadValues({}, token), { secondaryAmount: token.usdValue }),
1807
1807
  isActive: isSelected,
1808
1808
  isAvailable,
1809
1809
  onClick: () => handleTokenSelect(token),
@@ -1884,8 +1884,17 @@ var TokenSelector = ({
1884
1884
  ] });
1885
1885
  };
1886
1886
  function TokenSelectionItem(props) {
1887
- const _a = props, { token, isAvailable, isActive, AddWalletButton } = _a, PROPS = __objRest(_a, ["token", "isAvailable", "isActive", "AddWalletButton"]);
1888
- const hasAmount = token.amount > 0;
1887
+ const _a = props, {
1888
+ token,
1889
+ isAvailable = true,
1890
+ isActive,
1891
+ AddWalletButton
1892
+ } = _a, PROPS = __objRest(_a, [
1893
+ "token",
1894
+ "isAvailable",
1895
+ "isActive",
1896
+ "AddWalletButton"
1897
+ ]);
1889
1898
  const buttonRef = React6.useRef(null);
1890
1899
  const buttonContent = /* @__PURE__ */ jsxs13(
1891
1900
  "div",
@@ -1921,10 +1930,10 @@ function TokenSelectionItem(props) {
1921
1930
  ]
1922
1931
  })
1923
1932
  ),
1924
- /* @__PURE__ */ jsx21("div", { className: "flex flex-col items-end gap-[2px]", children: isAvailable ? hasAmount ? /* @__PURE__ */ jsxs13(Fragment3, { children: [
1925
- /* @__PURE__ */ jsx21("p", { className: "body-1 font-medium text-white", children: token.amount.toFixed(6) }),
1926
- /* @__PURE__ */ jsx21("p", { className: "text-caption text-brand-black-100", children: token.usdValue })
1927
- ] }) : /* @__PURE__ */ jsx21("p", { className: "body-1 font-medium text-brand-black-100", children: "0" }) : AddWalletButton })
1933
+ /* @__PURE__ */ jsx21("div", { className: "flex flex-col items-end gap-[2px]", children: isAvailable ? /* @__PURE__ */ jsxs13(Fragment3, { children: [
1934
+ /* @__PURE__ */ jsx21("p", { className: "body-1 font-medium text-white", children: token.amount }),
1935
+ /* @__PURE__ */ jsx21("p", { className: "text-caption text-brand-black-100", children: token.secondaryAmount })
1936
+ ] }) : AddWalletButton })
1928
1937
  ]
1929
1938
  }
1930
1939
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyperbridge/ui",
3
- "version": "0.0.11",
3
+ "version": "0.0.12",
4
4
  "sideEffects": false,
5
5
  "license": "MIT",
6
6
  "private": false,