Closed epoll31 closed 5 months ago
@epoll31 is attempting to deploy a commit to the SyntaxUI Team on Vercel.
A member of the Team first needs to authorize it.
please rebase with main to resolve conflict
@Ansub Just rebased!
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
syntax-ui | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | May 5, 2024 2:34pm |
Description
This PR adds in an optional
preview
prop toComponentPreview
that, when supplied, will override the default import from path.Related Issue
Fixes #147
Proposed Changes
preview
prop toComponentPreview
that will override the default import from the path insrc/components/code/ComponentPreview.tsx
preview?: React.ReactNote
toComponentPreviewProps
if (preview) return preview
in thePreview = useMemo(...)
preview
as a dependency to theuseMemo
src/components/code/Code.tsx
to solve issues with undefinedrawCode
code = useMemo(...)
to the top of the functioncode
instead ofrawCode
in theinline = useMemo(...)
Checklist
Please check the boxes that apply:
npm run build
and build is successful