@dynamic-labs/wallet-book 0.0.1 → 0.0.2

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.
@@ -1,6 +1,6 @@
1
- import { FC, PropsWithChildren } from 'react';
2
- export declare const WalletIcon: FC<PropsWithChildren<{
1
+ import React, { FC } from "react";
2
+ type WalletIconProps = React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement> & {
3
3
  walletName: string | undefined;
4
- width: number;
5
- height: number;
6
- }>>;
4
+ };
5
+ export declare const WalletIcon: FC<WalletIconProps>;
6
+ export {};
@@ -7,7 +7,7 @@ const getIconUrl_1 = require("../helpers/getIconUrl");
7
7
  const WalletIcon = ({ walletName, children, ...props }) => {
8
8
  const walletData = (0, helpers_1.getWalletBookWallet)(walletName);
9
9
  if (!walletData || !walletData.brand) {
10
- return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: children }));
10
+ return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: children });
11
11
  }
12
12
  return ((0, jsx_runtime_1.jsx)("img", { "data-testid": `wallet-icon-${walletName}`, ...props, alt: walletData.brand.alt, src: (0, getIconUrl_1.getWalletIconUrl)(walletName) }));
13
13
  };
@@ -1 +1 @@
1
- {"version":3,"file":"WalletIcon.js","sourceRoot":"","sources":["../../../../src/components/WalletIcon.tsx"],"names":[],"mappings":";;;;AACA,wCAAiD;AACjD,sDAAyD;AAElD,MAAM,UAAU,GAA6F,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE;IACzJ,MAAM,UAAU,GAAG,IAAA,6BAAmB,EAAC,UAAU,CAAC,CAAC;IACnD,IAAI,CAAC,UAAU,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE;QACpC,OAAO,CAAC,2DAAG,QAAQ,GAAI,CAAC,CAAA;KACzB;IACD,OAAO,CACL,+CACe,eAAe,UAAU,EAAE,KACpC,KAAK,EACT,GAAG,EAAE,UAAU,CAAC,KAAK,CAAC,GAAG,EACzB,GAAG,EAAE,IAAA,6BAAgB,EAAC,UAAU,CAAC,GACjC,CACH,CAAC;AACJ,CAAC,CAAC;AAbW,QAAA,UAAU,cAarB"}
1
+ {"version":3,"file":"WalletIcon.js","sourceRoot":"","sources":["../../../../src/components/WalletIcon.tsx"],"names":[],"mappings":";;;;AACA,wCAAiD;AACjD,sDAAyD;AASlD,MAAM,UAAU,GAAwB,CAAC,EAC9C,UAAU,EACV,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,UAAU,GAAG,IAAA,6BAAmB,EAAC,UAAU,CAAC,CAAC;IACnD,IAAI,CAAC,UAAU,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE;QACpC,OAAO,2DAAG,QAAQ,GAAI,CAAC;KACxB;IAED,OAAO,CACL,+CACe,eAAe,UAAU,EAAE,KACpC,KAAK,EACT,GAAG,EAAE,UAAU,CAAC,KAAK,CAAC,GAAG,EACzB,GAAG,EAAE,IAAA,6BAAgB,EAAC,UAAU,CAAC,GACjC,CACH,CAAC;AACJ,CAAC,CAAC;AAlBW,QAAA,UAAU,cAkBrB"}
@@ -1,6 +1,6 @@
1
- import { FC, PropsWithChildren } from 'react';
2
- export declare const WalletIcon: FC<PropsWithChildren<{
1
+ import React, { FC } from "react";
2
+ type WalletIconProps = React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement> & {
3
3
  walletName: string | undefined;
4
- width: number;
5
- height: number;
6
- }>>;
4
+ };
5
+ export declare const WalletIcon: FC<WalletIconProps>;
6
+ export {};
@@ -1,10 +1,10 @@
1
1
  import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
2
- import { getWalletBookWallet } from '../helpers';
3
- import { getWalletIconUrl } from '../helpers/getIconUrl';
2
+ import { getWalletBookWallet } from "../helpers";
3
+ import { getWalletIconUrl } from "../helpers/getIconUrl";
4
4
  export const WalletIcon = ({ walletName, children, ...props }) => {
5
5
  const walletData = getWalletBookWallet(walletName);
6
6
  if (!walletData || !walletData.brand) {
7
- return (_jsx(_Fragment, { children: children }));
7
+ return _jsx(_Fragment, { children: children });
8
8
  }
9
9
  return (_jsx("img", { "data-testid": `wallet-icon-${walletName}`, ...props, alt: walletData.brand.alt, src: getWalletIconUrl(walletName) }));
10
10
  };
@@ -1 +1 @@
1
- {"version":3,"file":"WalletIcon.js","sourceRoot":"","sources":["../../../../src/components/WalletIcon.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,MAAM,CAAC,MAAM,UAAU,GAA6F,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE;IACzJ,MAAM,UAAU,GAAG,mBAAmB,CAAC,UAAU,CAAC,CAAC;IACnD,IAAI,CAAC,UAAU,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE;QACpC,OAAO,CAAC,4BAAG,QAAQ,GAAI,CAAC,CAAA;KACzB;IACD,OAAO,CACL,6BACe,eAAe,UAAU,EAAE,KACpC,KAAK,EACT,GAAG,EAAE,UAAU,CAAC,KAAK,CAAC,GAAG,EACzB,GAAG,EAAE,gBAAgB,CAAC,UAAU,CAAC,GACjC,CACH,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"file":"WalletIcon.js","sourceRoot":"","sources":["../../../../src/components/WalletIcon.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AASzD,MAAM,CAAC,MAAM,UAAU,GAAwB,CAAC,EAC9C,UAAU,EACV,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,UAAU,GAAG,mBAAmB,CAAC,UAAU,CAAC,CAAC;IACnD,IAAI,CAAC,UAAU,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE;QACpC,OAAO,4BAAG,QAAQ,GAAI,CAAC;KACxB;IAED,OAAO,CACL,6BACe,eAAe,UAAU,EAAE,KACpC,KAAK,EACT,GAAG,EAAE,UAAU,CAAC,KAAK,CAAC,GAAG,EACzB,GAAG,EAAE,gBAAgB,CAAC,UAAU,CAAC,GACjC,CACH,CAAC;AACJ,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/wallet-book",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "scripts": {
5
5
  "build": "rimraf dist && yarn build:cjs && yarn build:esm && yarn compile",
6
6
  "build:cjs": "rimraf dist/cjs && tsc -p tsconfig.cjs.json",