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

feat: export Sandbox #309

Merged
merged 2 commits into from
Feb 17, 2025
Merged

feat: export Sandbox #309

merged 2 commits into from
Feb 17, 2025

Conversation

wangcch
Copy link
Collaborator

@wangcch wangcch commented Jan 24, 2025

You can control the preview yourself without loading the editor.

  1. Separate Sandbox from Preview
  2. Export Sandbox component
import { Sandbox, useStore } from '@vue/repl'

const store = useStore(
  {
    vueVersion: ref('3.5.13'),
  },
  location.hash,
)

return () => h(Sandbox, { store })

Copy link

vercel bot commented Jan 24, 2025

@wangcch is attempting to deploy a commit to the vuejs Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

vercel bot commented Feb 13, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
repl ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 13, 2025 1:54pm

Copy link

pkg-pr-new bot commented Feb 13, 2025

Open in Stackblitz

npm i https://pkg.pr.new/@vue/repl@309

commit: 94b9930

@wangcch
Copy link
Collaborator Author

wangcch commented Feb 14, 2025

#2
We could use the Sandbox component alone as a readonly preview of a project.

@edison1105
Copy link
Member

edison1105 commented Feb 16, 2025

LGTM
I think it's nice to have documentation for using Sandbox under README.md > ## Advanced Usage so users can refer to it.

@wangcch wangcch force-pushed the feat-export-sandbox branch from 8c14286 to 373659a Compare February 16, 2025 16:04
@wangcch wangcch force-pushed the feat-export-sandbox branch from 373659a to 94b9930 Compare February 16, 2025 16:05
@edison1105 edison1105 merged commit b549715 into vuejs:main Feb 17, 2025
2 of 3 checks passed
@edison1105
Copy link
Member

@wangcch Could we close #2 now?

@wangcch
Copy link
Collaborator Author

wangcch commented Feb 17, 2025

@wangcch Could we close #2 now?

I think it's OK 🙋‍♂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants