-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Dynamic markdown content? #391
Comments
Dynamic markdown is accessible as soon as a JSX block is opened. This includes inline JSX blocks, so you can do the following.
Eventually there will also be React.Fragment shorthands (currently under development):
|
Thanks @johno, could you link the issue of |
Yep, you can follow along here: |
For future googlers since this is the top result, currently this works for me:
These do not work even though they are theoretically the same thing
|
@skylarmb what version of @johno mentioned in mdx-js/specification#15 (comment) that your third example should work since v1 Alpha: Hello <>{props.name}</>, nice to meet you Seems like it was probably this pull request (landed in If it really is a problem, it may be worth it to submit a new issue, since this is supposed to work. |
Hi, We face the issue as well with <Preview>
<Story name="AddressSingle">
<AddressSingle title="Holder" name="Bank of China" address="0x28F7aB32C521D13F2E6980d072Ca7CA493020145">
<>
<ButtonSolid color="white" isIcon={true}>
Some
</ButtonSolid>
</>
</AddressSingle>
</Story>
</Preview> Error thrown by prettier is:
The error point to line 8, while the fragment from the code I shared is located line 22. We use [email protected] and @mdx-js/[email protected]. I can re-try tomorrow (it's late where I live) and open an issue if I am able to reproduce with a simpler example using mdx only (maybe it's a prettier issue also) |
@Nebulis does adding This fixed some MDX formatting problems for me: |
@karlhorky yes it works by using Thanks for pointing this out 👍 |
It will be nice if markdown content could be dynamic
The text was updated successfully, but these errors were encountered: