@web3modal/react
Advanced tools
Comparing version 2.2.0-17f140d to 2.2.0-afa987d
export declare function useWeb3ModalTheme(): { | ||
theme: { | ||
themeMode: "dark" | "light" | undefined; | ||
themeVariables: { | ||
'--w3m-z-index'?: string | undefined; | ||
'--w3m-accent-color'?: string | undefined; | ||
'--w3m-accent-fill-color'?: string | undefined; | ||
'--w3m-background-color'?: string | undefined; | ||
'--w3m-background-image-url'?: string | undefined; | ||
'--w3m-logo-image-url'?: string | undefined; | ||
'--w3m-background-border-radius'?: string | undefined; | ||
'--w3m-container-border-radius'?: string | undefined; | ||
'--w3m-wallet-icon-border-radius'?: string | undefined; | ||
'--w3m-input-border-radius'?: string | undefined; | ||
'--w3m-notification-border-radius'?: string | undefined; | ||
'--w3m-button-border-radius'?: string | undefined; | ||
'--w3m-secondary-button-border-radius'?: string | undefined; | ||
'--w3m-icon-button-border-radius'?: string | undefined; | ||
'--w3m-button-hover-highlight-border-radius'?: string | undefined; | ||
'--w3m-font-family'?: string | undefined; | ||
'--w3m-text-big-bold-size'?: string | undefined; | ||
'--w3m-text-big-bold-weight'?: string | undefined; | ||
'--w3m-text-big-bold-line-height'?: string | undefined; | ||
'--w3m-text-big-bold-letter-spacing'?: string | undefined; | ||
'--w3m-text-big-bold-text-transform'?: string | undefined; | ||
'--w3m-text-big-bold-font-family'?: string | undefined; | ||
'--w3m-text-medium-regular-size'?: string | undefined; | ||
'--w3m-text-medium-regular-weight'?: string | undefined; | ||
'--w3m-text-medium-regular-line-height'?: string | undefined; | ||
'--w3m-text-medium-regular-letter-spacing'?: string | undefined; | ||
'--w3m-text-medium-regular-text-transform'?: string | undefined; | ||
'--w3m-text-medium-regular-font-family'?: string | undefined; | ||
'--w3m-text-small-regular-size'?: string | undefined; | ||
'--w3m-text-small-regular-weight'?: string | undefined; | ||
'--w3m-text-small-regular-line-height'?: string | undefined; | ||
'--w3m-text-small-regular-letter-spacing'?: string | undefined; | ||
'--w3m-text-small-regular-text-transform'?: string | undefined; | ||
'--w3m-text-small-regular-font-family'?: string | undefined; | ||
'--w3m-text-small-thin-size'?: string | undefined; | ||
'--w3m-text-small-thin-weight'?: string | undefined; | ||
'--w3m-text-small-thin-line-height'?: string | undefined; | ||
'--w3m-text-small-thin-letter-spacing'?: string | undefined; | ||
'--w3m-text-small-thin-text-transform'?: string | undefined; | ||
'--w3m-text-small-thin-font-family'?: string | undefined; | ||
'--w3m-text-xsmall-bold-size'?: string | undefined; | ||
'--w3m-text-xsmall-bold-weight'?: string | undefined; | ||
'--w3m-text-xsmall-bold-line-height'?: string | undefined; | ||
'--w3m-text-xsmall-bold-letter-spacing'?: string | undefined; | ||
'--w3m-text-xsmall-bold-text-transform'?: string | undefined; | ||
'--w3m-text-xsmall-bold-font-family'?: string | undefined; | ||
'--w3m-text-xsmall-regular-size'?: string | undefined; | ||
'--w3m-text-xsmall-regular-weight'?: string | undefined; | ||
'--w3m-text-xsmall-regular-line-height'?: string | undefined; | ||
'--w3m-text-xsmall-regular-letter-spacing'?: string | undefined; | ||
'--w3m-text-xsmall-regular-text-transform'?: string | undefined; | ||
'--w3m-text-xsmall-regular-font-family'?: string | undefined; | ||
} | undefined; | ||
}; | ||
setTheme: (theme: import("@web3modal/core").ThemeCtrlState) => void; | ||
}; |
@@ -1,2 +0,2 @@ | ||
import c,{memo as C,useCallback as P,useEffect as i,useState as d}from"react";import{ThemeCtrl as a,ClientCtrl as g,ConfigCtrl as E,OptionsCtrl as h,ModalCtrl as o}from"@web3modal/core";var M=Object.defineProperty,p=Object.getOwnPropertySymbols,S=Object.prototype.hasOwnProperty,I=Object.prototype.propertyIsEnumerable,u=(t,e,r)=>e in t?M(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,T=(t,e)=>{for(var r in e||(e={}))S.call(e,r)&&u(t,r,e[r]);if(p)for(var r of p(e))I.call(e,r)&&u(t,r,e[r]);return t};function _(t){return c.createElement("w3m-core-button",T({},t))}var W=Object.defineProperty,f=Object.getOwnPropertySymbols,k=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable,s=(t,e,r)=>e in t?W(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,D=(t,e)=>{for(var r in e||(e={}))k.call(e,r)&&s(t,r,e[r]);if(f)for(var r of f(e))x.call(e,r)&&s(t,r,e[r]);return t};function V(t){return c.createElement("w3m-modal",D({},t))}var B=Object.defineProperty,L=Object.defineProperties,N=Object.getOwnPropertyDescriptors,l=Object.getOwnPropertySymbols,j=Object.prototype.hasOwnProperty,$=Object.prototype.propertyIsEnumerable,v=(t,e,r)=>e in t?B(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,U=(t,e)=>{for(var r in e||(e={}))j.call(e,r)&&v(t,r,e[r]);if(l)for(var r of l(e))$.call(e,r)&&v(t,r,e[r]);return t},q=(t,e)=>L(t,N(e)),z=(t,e)=>{var r={};for(var n in t)j.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&l)for(var n of l(t))e.indexOf(n)<0&&$.call(t,n)&&(r[n]=t[n]);return r};function A(t){var e=t,{ethereumClient:r}=e,n=z(e,["ethereumClient"]);const b=P(async()=>{a.setThemeConfig(n),r&&g.setEthereumClient(r),E.setConfig(q(U({},n),{walletConnectVersion:r?.walletConnectVersion})),await import("@web3modal/ui"),h.setIsUiLoaded(!0)},[r,n]);return i(()=>{b()},[b]),c.createElement(V,null)}const ee=C(A);var F=Object.defineProperty,m=Object.getOwnPropertySymbols,G=Object.prototype.hasOwnProperty,H=Object.prototype.propertyIsEnumerable,y=(t,e,r)=>e in t?F(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,J=(t,e)=>{for(var r in e||(e={}))G.call(e,r)&&y(t,r,e[r]);if(m)for(var r of m(e))H.call(e,r)&&y(t,r,e[r]);return t};function re(t){return c.createElement("w3m-network-switch",J({},t))}var K=Object.defineProperty,O=Object.getOwnPropertySymbols,Q=Object.prototype.hasOwnProperty,R=Object.prototype.propertyIsEnumerable,w=(t,e,r)=>e in t?K(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,X=(t,e)=>{for(var r in e||(e={}))Q.call(e,r)&&w(t,r,e[r]);if(O)for(var r of O(e))R.call(e,r)&&w(t,r,e[r]);return t};function te(){const[t,e]=d(o.state);return i(()=>{const r=o.subscribe(n=>e(X({},n)));return()=>{r()}},[]),{isOpen:t.open,open:o.open,close:o.close,setDefaultChain:h.setSelectedChain}}function ne(){const[t,e]=d({themeMode:a.state.themeMode});return i(()=>{const r=a.subscribe(n=>e({themeMode:n.themeMode}));return()=>{r()}},[]),{theme:t,setTheme:a.setThemeConfig}}export{_ as Web3Button,ee as Web3Modal,re as Web3NetworkSwitch,te as useWeb3Modal,ne as useWeb3ModalTheme}; | ||
import i,{memo as C,useCallback as P,useEffect as c,useState as w}from"react";import{ThemeCtrl as a,ClientCtrl as g,ConfigCtrl as E,OptionsCtrl as d,ModalCtrl as o}from"@web3modal/core";var M=Object.defineProperty,s=Object.getOwnPropertySymbols,S=Object.prototype.hasOwnProperty,I=Object.prototype.propertyIsEnumerable,p=(t,e,r)=>e in t?M(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,V=(t,e)=>{for(var r in e||(e={}))S.call(e,r)&&p(t,r,e[r]);if(s)for(var r of s(e))I.call(e,r)&&p(t,r,e[r]);return t};function _(t){return i.createElement("w3m-core-button",V({},t))}var T=Object.defineProperty,u=Object.getOwnPropertySymbols,W=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable,f=(t,e,r)=>e in t?T(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,x=(t,e)=>{for(var r in e||(e={}))W.call(e,r)&&f(t,r,e[r]);if(u)for(var r of u(e))k.call(e,r)&&f(t,r,e[r]);return t};function D(t){return i.createElement("w3m-modal",x({},t))}var B=Object.defineProperty,L=Object.defineProperties,N=Object.getOwnPropertyDescriptors,l=Object.getOwnPropertySymbols,j=Object.prototype.hasOwnProperty,$=Object.prototype.propertyIsEnumerable,m=(t,e,r)=>e in t?B(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,U=(t,e)=>{for(var r in e||(e={}))j.call(e,r)&&m(t,r,e[r]);if(l)for(var r of l(e))$.call(e,r)&&m(t,r,e[r]);return t},q=(t,e)=>L(t,N(e)),z=(t,e)=>{var r={};for(var n in t)j.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&l)for(var n of l(t))e.indexOf(n)<0&&$.call(t,n)&&(r[n]=t[n]);return r};function A(t){var e=t,{ethereumClient:r}=e,n=z(e,["ethereumClient"]);const b=P(async()=>{a.setThemeConfig(n),r&&g.setEthereumClient(r),E.setConfig(q(U({},n),{walletConnectVersion:r?.walletConnectVersion})),await import("@web3modal/ui"),d.setIsUiLoaded(!0)},[r,n]);return c(()=>{b()},[b]),i.createElement(D,null)}const ee=C(A);var F=Object.defineProperty,v=Object.getOwnPropertySymbols,G=Object.prototype.hasOwnProperty,H=Object.prototype.propertyIsEnumerable,y=(t,e,r)=>e in t?F(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,J=(t,e)=>{for(var r in e||(e={}))G.call(e,r)&&y(t,r,e[r]);if(v)for(var r of v(e))H.call(e,r)&&y(t,r,e[r]);return t};function re(t){return i.createElement("w3m-network-switch",J({},t))}var K=Object.defineProperty,O=Object.getOwnPropertySymbols,Q=Object.prototype.hasOwnProperty,R=Object.prototype.propertyIsEnumerable,h=(t,e,r)=>e in t?K(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,X=(t,e)=>{for(var r in e||(e={}))Q.call(e,r)&&h(t,r,e[r]);if(O)for(var r of O(e))R.call(e,r)&&h(t,r,e[r]);return t};function te(){const[t,e]=w(o.state);return c(()=>{const r=o.subscribe(n=>e(X({},n)));return()=>{r()}},[]),{isOpen:t.open,open:o.open,close:o.close,setDefaultChain:d.setSelectedChain}}function ne(){const[t,e]=w({themeMode:a.state.themeMode,themeVariables:a.state.themeVariables});return c(()=>{const r=a.subscribe(n=>e({themeMode:n.themeMode,themeVariables:n.themeVariables}));return()=>{r()}},[]),{theme:t,setTheme:a.setThemeConfig}}export{_ as Web3Button,ee as Web3Modal,re as Web3NetworkSwitch,te as useWeb3Modal,ne as useWeb3ModalTheme}; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@web3modal/react", | ||
"version": "2.2.0-17f140d", | ||
"version": "2.2.0-afa987d", | ||
"main": "dist/index.js", | ||
@@ -19,4 +19,4 @@ "type": "module", | ||
"dependencies": { | ||
"@web3modal/core": "2.2.0-17f140d", | ||
"@web3modal/ui": "2.2.0-17f140d" | ||
"@web3modal/core": "2.2.0-afa987d", | ||
"@web3modal/ui": "2.2.0-afa987d" | ||
}, | ||
@@ -26,3 +26,3 @@ "devDependencies": { | ||
"@types/react-dom": "18.0.11", | ||
"@web3modal/ethereum": "2.2.0-17f140d", | ||
"@web3modal/ethereum": "2.2.0-afa987d", | ||
"eslint-plugin-react": "7.32.2", | ||
@@ -29,0 +29,0 @@ "eslint-plugin-react-hooks": "4.6.0", |
Sorry, the diff of this file is not supported yet
18855
147
+ Added@web3modal/core@2.2.0-afa987d(transitive)
+ Added@web3modal/ui@2.2.0-afa987d(transitive)
- Removed@web3modal/core@2.2.0-17f140d(transitive)
- Removed@web3modal/ui@2.2.0-17f140d(transitive)
Updated@web3modal/ui@2.2.0-afa987d