-
Notifications
You must be signed in to change notification settings - Fork 21
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
Passing non-Sanity props to custom components #12
Comments
Running into the exact same "problem"! +1 |
Actually @rscheuer , I just found out this is possible by first looking through the source code, and then the documentation. See this reference: https://github.com/portabletext/svelte-portabletext/blob/35511cf7043aeb529bad8d2080c7e26b4241bca8/README.md#customizing-rendering Here's my code:
Then in the
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In the react docs, it seems possible to render custom components with external props, as seen here in the docs :
However, in the svelte implementation, the docs suggest that we just pass the name of the Svelte component in the serializer:
I'd like to be able to pass external props (in this case from the field's parent document) into a PortableText block. So far, I'm able to get by with Svelte stores, but it feels more like a workaround.
The text was updated successfully, but these errors were encountered: