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

How to interpolate block-level components? #15

Open
tamagokun opened this issue Nov 8, 2017 · 0 comments
Open

How to interpolate block-level components? #15

tamagokun opened this issue Nov 8, 2017 · 0 comments

Comments

@tamagokun
Copy link

tamagokun commented Nov 8, 2017

Willing to come up with a PR if there are any ideas around how this API would work.

Right now my workaround is to wrap the interpolated component with a <div> so that it will render inside a div rather than a p.

markdown`
<div>
${<MyBlockLevelComponent />}
</div>
`

I'm wondering if there is a way to "detect" the tag name of the rendered component, or if we need to rely on an option passed into the markdown function, such as markdown({nowrap: [MyBlockLevelComponent]})

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

No branches or pull requests

1 participant