Skip to content

Commit 776435f

Browse files
committed
update Code groups
1 parent c8f48de commit 776435f

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

components/code-groups.mdx

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
---
22
title: "Code groups"
3-
description: "The CodeGroup component lets you combine code blocks in a display separated by tabs"
3+
description: "Display multiple code examples in a tabbed interface"
44
icon: "group"
55
---
66

7-
You will need to make [Code Blocks](/code) then add the `<CodeGroup>` component around them. Every Code Block must have a filename because we use the names for the tab buttons.
8-
9-
See below for an example of the end result.
7+
Use the `CodeGroup` component to display multiple code blocks in a tabbed interface, making it easy for users to compare implementations across different programming languages or see alternative approaches to the same task.
108

119
<CodeGroup>
1210

@@ -28,9 +26,9 @@ class HelloWorld {
2826

2927
</CodeGroup>
3028

31-
<RequestExample>
29+
To create a code group, wrap multiple code blocks with `<CodeGroup>` tags. Each code block must include filename, which becomes the tab label.
3230

33-
````mdx Code Group Example
31+
````mdx
3432
<CodeGroup>
3533

3634
```javascript helloWorld.js
@@ -51,5 +49,3 @@ class HelloWorld {
5149

5250
</CodeGroup>
5351
````
54-
55-
</RequestExample>

0 commit comments

Comments
 (0)