Skip to content

Commit 642e6be

Browse files
committed
add language dropdown example
1 parent 9c17a78 commit 642e6be

File tree

1 file changed

+22
-5
lines changed

1 file changed

+22
-5
lines changed

components/code-groups.mdx

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class HelloWorld {
3030

3131
## Language dropdown
3232

33-
You can replace the tabs in a code group with a dropdown menu to toggle between languages.
33+
You can replace the tabs in a code group with a dropdown menu to toggle between languages using `dropdown` prop.
3434

3535
<CodeGroup dropdown>
3636

@@ -52,11 +52,28 @@ class HelloWorld {
5252

5353
</CodeGroup>
5454

55-
### Props
5655

57-
<ResponseField name="dropdown" type="boolean">
58-
Whether to show a dropdown button to toggle the code groups with languages as the options.
59-
</ResponseField>
56+
````mdx
57+
<CodeGroup dropdown>
58+
59+
```javascript helloWorld.js
60+
console.log("Hello World");
61+
```
62+
63+
```python hello_world.py
64+
print('Hello World!')
65+
```
66+
67+
```java HelloWorld.java
68+
class HelloWorld {
69+
public static void main(String[] args) {
70+
System.out.println("Hello, World!");
71+
}
72+
}
73+
```
74+
</CodeGroup>
75+
````
76+
6077

6178
<RequestExample>
6279

0 commit comments

Comments
 (0)