-
Notifications
You must be signed in to change notification settings - Fork 33
Markdown Tab Component #128
Comments
Thought about the design of this: Docusaurus is using html comment strings to do the component injection. We don't need to do that, we can use MDX to do the dirty bits, leading to a much cleaner solution. This is how I'd imagine the markdown to look like:
Here, The Tab component has the same look and feel as a normal code example box, but displays available languages in the top right corner. Clicking on a language will toggle to the appropriate content. Implementation wise, the component would need to look at its children, checking the |
In the Screenshot the tabs are titled "Reason" and "Output". |
@woeps I find
|
I thought this might be some preparation for larger examples, where each "tab" would represent a file/module. Now, I see this was a misconception of mine. |
The official ReasonML docs started using Docusaurus' tabable component to make the code examples more compact:
We need an equivalent to represent the same code snippet in different languages and make them tabbable.
The text was updated successfully, but these errors were encountered: