File tree Expand file tree Collapse file tree 8 files changed +19
-9
lines changed Expand file tree Collapse file tree 8 files changed +19
-9
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @web3-onboard/core" ,
3
- "version" : " 2.4.0-alpha.6 " ,
3
+ "version" : " 2.4.0-alpha.7 " ,
4
4
"repository" : " blocknative/web3-onboard" ,
5
5
"scripts" : {
6
6
"build" : " rollup -c" ,
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ export const APP_INITIAL_STATE: AppState = {
9
9
enabled : true ,
10
10
position : 'topRight' ,
11
11
expanded : false ,
12
+ containerElement : 'body' ,
12
13
minimal : configuration . device . type === 'mobile'
13
14
} ,
14
15
notify : {
Original file line number Diff line number Diff line change @@ -314,7 +314,13 @@ function mountApp() {
314
314
</style>
315
315
`
316
316
317
- document . body . appendChild ( onboard )
317
+ const containerElementQuery = state . get ( ) . accountCenter . containerElement || 'body'
318
+ const containerElement = document . querySelector ( containerElementQuery )
319
+ if ( ! containerElement ) {
320
+ throw new Error ( `Element with query ${ state . get ( ) . accountCenter } does not exist.` )
321
+ }
322
+
323
+ containerElement . appendChild ( onboard )
318
324
319
325
const app = new App ( {
320
326
target
Original file line number Diff line number Diff line change @@ -138,6 +138,7 @@ export type NotificationPosition = CommonPositions
138
138
export type AccountCenter = {
139
139
enabled : boolean
140
140
position ?: AccountCenterPosition
141
+ containerElement ?: string
141
142
expanded ?: boolean
142
143
minimal ?: boolean
143
144
}
Original file line number Diff line number Diff line change @@ -159,12 +159,14 @@ const initOptions = Joi.object({
159
159
desktop : Joi . object ( {
160
160
enabled : Joi . boolean ( ) ,
161
161
minimal : Joi . boolean ( ) ,
162
- position : commonPositions
162
+ position : commonPositions ,
163
+ containerElement : Joi . string ( )
163
164
} ) ,
164
165
mobile : Joi . object ( {
165
166
enabled : Joi . boolean ( ) ,
166
167
minimal : Joi . boolean ( ) ,
167
- position : commonPositions
168
+ position : commonPositions ,
169
+ containerElement : Joi . string ( )
168
170
} )
169
171
} ) ,
170
172
notify : [ notifyOptions , notify ]
Original file line number Diff line number Diff line change 23
23
},
24
24
"dependencies" : {
25
25
"@web3-onboard/coinbase" : " ^2.0.7" ,
26
- "@web3-onboard/core" : " ^2.4.0-alpha.6 " ,
26
+ "@web3-onboard/core" : " ^2.4.0-alpha.7 " ,
27
27
"@web3-onboard/dcent" : " ^2.0.4" ,
28
28
"@web3-onboard/fortmatic" : " ^2.0.6" ,
29
29
"@web3-onboard/gnosis" : " ^2.0.5" ,
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @web3-onboard/react" ,
3
- "version" : " 2.2.3-alpha.4 " ,
3
+ "version" : " 2.2.3-alpha.5 " ,
4
4
"description" : " Collection of React Hooks for web3-onboard" ,
5
5
"repository" : " blocknative/web3-onboard" ,
6
6
"module" : " dist/index.js" ,
24
24
"typescript" : " ^4.5.5"
25
25
},
26
26
"dependencies" : {
27
- "@web3-onboard/core" : " ^2.4.0-alpha.6 " ,
27
+ "@web3-onboard/core" : " ^2.4.0-alpha.7 " ,
28
28
"@web3-onboard/common" : " ^2.1.4" ,
29
29
"use-sync-external-store" : " 1.0.0"
30
30
},
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @web3-onboard/vue" ,
3
- "version" : " 2.1.3-alpha.4 " ,
3
+ "version" : " 2.1.3-alpha.5 " ,
4
4
"description" : " Vue Composable for web3-onboard" ,
5
5
"repository" : " blocknative/web3-onboard" ,
6
6
"module" : " dist/index.js" ,
25
25
"@vueuse/core" : " ^8.4.2" ,
26
26
"@vueuse/rxjs" : " ^8.2.0" ,
27
27
"@web3-onboard/common" : " ^2.1.4" ,
28
- "@web3-onboard/core" : " ^2.4.0-alpha.6 " ,
28
+ "@web3-onboard/core" : " ^2.4.0-alpha.7 " ,
29
29
"vue-demi" : " ^0.12.4"
30
30
},
31
31
"peerDependencies" : {
You can’t perform that action at this time.
0 commit comments