Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sandpack for examples #323

Open
DavieReid opened this issue Apr 18, 2023 · 2 comments
Open

Sandpack for examples #323

DavieReid opened this issue Apr 18, 2023 · 2 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@DavieReid
Copy link
Contributor

We are beginning to add code examples to the mosaic docs now and these examples would be much clearer if the markdown and rendered preview were accessible on the page.

The new React doc use sandpack for this so that might be a good starting point.

@DavieReid DavieReid added documentation Improvements or additions to documentation enhancement New feature or request labels Apr 18, 2023
@lilyvc
Copy link
Contributor

lilyvc commented Jun 26, 2023

I've investigated this and found an issue with Sandpack not displaying a Next.js example within our site or a basic Next.js site.

I created a basic Next.js site with two Sandpack components, one using vanilla JS and the other using the Next.js Sandpack template. While the vanilla JS component works, the Next.js Sandpack template throws an error, as do other node templates.

You can find the basic example here https://codesandbox.io/p/sandbox/sandpack-nextjs-inside-nextjs-h27gql?file=%2Fpages%2Findex.tsx%3A14%2C1

@origami-z
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants