From eda3e3b65dd016c4f649beb7bd5e7d7b6292d7c0 Mon Sep 17 00:00:00 2001 From: dks333 Date: Wed, 9 Jul 2025 13:10:20 -0700 Subject: [PATCH 1/3] add code group dropdowns --- components/code-groups.mdx | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/components/code-groups.mdx b/components/code-groups.mdx index c1eb4d08b..7a527c7f9 100644 --- a/components/code-groups.mdx +++ b/components/code-groups.mdx @@ -28,6 +28,32 @@ class HelloWorld { +### Dropdown + +You can also show a dropdown button to toggle the code groups with languages as the options. + + + +```javascript helloWorld.js +console.log("Hello World"); +``` + +```python hello_world.py +print('Hello World!') +``` + +```java HelloWorld.java +class HelloWorld { + public static void main(String[] args) { + System.out.println("Hello, World!"); + } +} +``` + + + + + ````mdx Code Group Example @@ -53,3 +79,10 @@ class HelloWorld { ```` + +### Props + + + Whether to show a dropdown button to toggle the code groups with languages as the options. + + From 77722cd7b833fe0e8dc6518bd851336d89ebcff4 Mon Sep 17 00:00:00 2001 From: dks333 Date: Wed, 9 Jul 2025 13:11:20 -0700 Subject: [PATCH 2/3] fix the title --- components/code-groups.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/code-groups.mdx b/components/code-groups.mdx index 7a527c7f9..1aea39adf 100644 --- a/components/code-groups.mdx +++ b/components/code-groups.mdx @@ -28,7 +28,7 @@ class HelloWorld { -### Dropdown +### Language dropdown You can also show a dropdown button to toggle the code groups with languages as the options. From e2d2f75a4979c639d4d999e353aad61b73b72d9d Mon Sep 17 00:00:00 2001 From: Ethan Palm <56270045+ethanpalm@users.noreply.github.com> Date: Wed, 9 Jul 2025 13:54:49 -0700 Subject: [PATCH 3/3] reviewer edits --- components/code-groups.mdx | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/components/code-groups.mdx b/components/code-groups.mdx index 1aea39adf..9cd3807a6 100644 --- a/components/code-groups.mdx +++ b/components/code-groups.mdx @@ -28,9 +28,9 @@ class HelloWorld { -### Language dropdown +## Language dropdown -You can also show a dropdown button to toggle the code groups with languages as the options. +You can replace the tabs in a code group with a dropdown menu to toggle between languages. @@ -52,7 +52,11 @@ class HelloWorld { +### Props + + Whether to show a dropdown button to toggle the code groups with languages as the options. + @@ -79,10 +83,3 @@ class HelloWorld { ```` - -### Props - - - Whether to show a dropdown button to toggle the code groups with languages as the options. - -