Skip to content
This repository was archived by the owner on Mar 25, 2025. It is now read-only.

v2.2.0

Choose a tag to compare

@emmenko emmenko released this 25 Mar 12:37
9b2baa6

2.2.0 (2020-03-25)

🚀 Type: New Feature

  • gatsby-theme-docs, ui-kit

Documentation writers can now reference multiple code examples together in the MDX files. The code examples are grouped together and enables users to switch between them via a dropdown. This is useful when there is a need to provide examples that achieve the same thing in different programming languages.

<MultiCodeExample title="Multilanguage Code Samples">
  <CodeExample path="example.js" highlightLines={[3]} />
  <CodeExample path="example.java"/>
  <CodeExample path="example.console" noPromptLines={[3, 4]} />
</MultiCodeExample>

The code example files are expected to be saved in src/code-examples.