eui
eui copied to clipboard
[New docs] Add interactive Demo component
Summary
We want to show examples of our components on the EUI+ website that include source code and interactive outputs. Similar to what we do on the current documentation site, but with interactive components like this docusaurus example.
This is the first iteration of this feature. More features (e.g., codesandbox link) will be added later.
Acceptance criteria
- The interactive demo feature should be added and available as a global
<InteractiveDemo>MDX component - The source code preview should support JS and TS syntax and provide basic syntax highlighting
- It should be based on
react-livebut not use the built-in docusaurus live code block component for futureproofing - The source code should render below the preview and be collapsed by default