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

Added Editor component #1434

Merged
merged 9 commits into from
Mar 11, 2024
Merged

Added Editor component #1434

merged 9 commits into from
Mar 11, 2024

Conversation

mattpocock
Copy link
Collaborator

@mattpocock mattpocock commented Mar 9, 2024

Head to /typescript-enum to see the new components in action.

Added an MDXTranspile component for previewing how code transpiles:

image

Added an Editor component which turns a code block into a code editor:

image

  • Both components only load the monaco editor (a heavy dependency) when visible.
  • Both allow for pressing CMD-S to auto-format the code sample with prettier
  • I haven't been able to make the syntax highlighting of the monaco editor match the site's. TBH I prefer the vs-dark theme of the monaco editor to the github-dark of the site's anyway. But @vojtaholik I'm fine with whichever you prefer.

Copy link

vercel bot commented Mar 9, 2024

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

Name Status Preview Comments Updated (UTC)
badass-turbo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 11, 2024 2:37pm
colt-steele ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 11, 2024 2:37pm
devrel-fyi ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 11, 2024 2:37pm
epic-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 11, 2024 2:37pm
pro-aws ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 11, 2024 2:37pm
pro-nextjs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 11, 2024 2:37pm
skill-stack-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 11, 2024 2:37pm
testing-javascript ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 11, 2024 2:37pm
total-typescript-turbo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 11, 2024 2:37pm

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