This repository was archived by the owner on Mar 11, 2025. It is now read-only.
File tree 5 files changed +2750
-65
lines changed
docs/04-integrating-with-sygma/01-Sygma Widget
5 files changed +2750
-65
lines changed Original file line number Diff line number Diff line change @@ -449,6 +449,7 @@ rollup
449
449
5EYCAe5jLbHcAAMKvLFSXgCTbPrLgBJusvPwfKcaKzuf5X5e
450
450
Merkle
451
451
sygma-widget-index
452
+ sygma-widget-playground
452
453
customizable
453
454
frontend
454
455
Vite
Original file line number Diff line number Diff line change
1
+ ---
2
+ id : sygma-widget-playground
3
+ slug : /sygma-widget/playground
4
+ title : Playground
5
+ description : The following section provides a Sygma Widget playground
6
+ sidebar_position : 4
7
+ ---
8
+
9
+ import App from '../../../src/Widget/App';
10
+
11
+ <App />
12
+
13
+ ### Steps
14
+
15
+ 1 . From network drop-down menu, select the desired network from which you want to bridge assets
16
+ 2 . Connect your wallet by clicking ` Connect Wallet ` in the top-right corner
17
+ 3 . From network drop-down menu, select the desired network to which you want to bridge assets
18
+ 3 . From assets drop-down menu, select the asset you want to bridge
19
+ 4 . Input the destination address
20
+ 5 . ` Approve token `
Original file line number Diff line number Diff line change 16
16
},
17
17
"dependencies" : {
18
18
"@buildwithsygma/sygma-sdk-core" : " ^2.7.3" ,
19
+ "@buildwithsygma/sygmaprotocol-react-widget" : " ^0.1.2" ,
19
20
"@cmfcmf/docusaurus-search-local" : " ^1.0.0" ,
20
21
"@docusaurus/core" : " ^2.3.1" ,
21
22
"@docusaurus/preset-classic" : " ^2.3.1" ,
24
25
"@mdx-js/react" : " ^1.6.22" ,
25
26
"@mui/icons-material" : " ^5.15.10" ,
26
27
"@mui/material" : " ^5.15.10" ,
28
+ "@polkadot/extension-inject" : " ^0.47.5" ,
27
29
"clsx" : " ^1.2.1" ,
28
30
"js-cookie" : " ^3.0.5" ,
29
31
"prism-react-renderer" : " ^1.3.5" ,
34
36
"devDependencies" : {
35
37
"@docusaurus/module-type-aliases" : " ^2.3.1" ,
36
38
"@tsconfig/docusaurus" : " ^1.0.5" ,
37
- "typescript" : " ^4.7.4 "
39
+ "typescript" : " ^5.2.2 "
38
40
},
39
41
"browserslist" : {
40
42
"production" : [
Original file line number Diff line number Diff line change
1
+ import { Environment } from '@buildwithsygma/sygma-sdk-core' ;
2
+ import React from 'react' ;
3
+ import { Container } from '@mui/material' ;
4
+ import BrowserOnly from '@docusaurus/BrowserOnly' ;
5
+
6
+ function App ( ) {
7
+ return (
8
+ < BrowserOnly fallback = { < div > Loading...</ div > } >
9
+ { ( ) => {
10
+ const { SygmaProtocolReactWidget} = require ( '@buildwithsygma/sygmaprotocol-react-widget/build/WidgetReact' ) ;
11
+ return < Container sx = { { display : "flex" , justifyContent : "center" , alignItems : "center" } } >
12
+ < SygmaProtocolReactWidget environment = { Environment . TESTNET } />
13
+ </ Container >
14
+ } }
15
+ </ BrowserOnly >
16
+ )
17
+ }
18
+
19
+ export default App ;
You can’t perform that action at this time.
0 commit comments