This repository was archived by the owner on Mar 11, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +2750
-65
lines changed
docs/04-integrating-with-sygma/01-Sygma Widget Expand file tree Collapse file tree 5 files changed +2750
-65
lines changed Original file line number Diff line number Diff line change @@ -449,6 +449,7 @@ rollup
4494495EYCAe5jLbHcAAMKvLFSXgCTbPrLgBJusvPwfKcaKzuf5X5e
450450Merkle
451451sygma-widget-index
452+ sygma-widget-playground
452453customizable
453454frontend
454455Vite
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 1616 },
1717 "dependencies" : {
1818 "@buildwithsygma/sygma-sdk-core" : " ^2.7.3" ,
19+ "@buildwithsygma/sygmaprotocol-react-widget" : " ^0.1.2" ,
1920 "@cmfcmf/docusaurus-search-local" : " ^1.0.0" ,
2021 "@docusaurus/core" : " ^2.3.1" ,
2122 "@docusaurus/preset-classic" : " ^2.3.1" ,
2425 "@mdx-js/react" : " ^1.6.22" ,
2526 "@mui/icons-material" : " ^5.15.10" ,
2627 "@mui/material" : " ^5.15.10" ,
28+ "@polkadot/extension-inject" : " ^0.47.5" ,
2729 "clsx" : " ^1.2.1" ,
2830 "js-cookie" : " ^3.0.5" ,
2931 "prism-react-renderer" : " ^1.3.5" ,
3436 "devDependencies" : {
3537 "@docusaurus/module-type-aliases" : " ^2.3.1" ,
3638 "@tsconfig/docusaurus" : " ^1.0.5" ,
37- "typescript" : " ^4.7.4 "
39+ "typescript" : " ^5.2.2 "
3840 },
3941 "browserslist" : {
4042 "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