metamask-docs
metamask-docs copied to clipboard
Add interactive code samples
@alexandratran commented on Tue Jan 17 2023
Use CodeSandbox to display interactive code samples. This might take the place of the example button implementations in the legacy site, for example see Accessing Accounts, Connecting to MetaMask, and Sending Transactions.
@vandan commented on Tue Apr 04 2023
Next step would be to fully set up CodeSandbox with a set of global dependencies.
- [ ] Set up template with all dependencies we want in a new repository
- [ ] Provide a readme that links to the template and provides guidelines for adding a codeblock with new external dependencies
- [ ] Add a set of initial runnable examples (at least parity with legacy site as described above)
We probably need Shane or Zach to create a bare-bones simple example of a code sandbox for a feature that we could test this out with.
Signing transactions or maybe using the wallet_watchAsset or wallet_addSwitchChain API.