You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: fern/products/docs/pages/component-library/default-components/tabs.mdx
+49Lines changed: 49 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -95,10 +95,34 @@ In the example below, choosing a language in either set of tabs will automatical
95
95
</Tab>
96
96
</Tabs>
97
97
98
+
<CodeBlocktitle="Markdown">
99
+
````jsx
100
+
<Tabs>
101
+
<Tab title="TypeScript" language="typescript">
102
+
```typescript
103
+
console.log("Content inside the TypeScript tab");
104
+
```
105
+
</Tab>
106
+
<Tab title="Python" language="python">
107
+
```python
108
+
print("Content inside the Python tab")
109
+
```
110
+
</Tab>
111
+
<Tab title="Java" language="java">
112
+
```java
113
+
System.out.println("Content inside the Java tab");
114
+
```
115
+
</Tab>
116
+
</Tabs>
117
+
````
118
+
</CodeBlock>
119
+
98
120
<Notetitle="Tabs and CodeBlocks integration">
99
121
Language-enabled `Tabs` automatically synchronize with [`CodeBlocks` in that same language](/docs/writing-content/components/code-blocks#language-synchronization).
100
122
</Note>
101
123
124
+
<Accordiontitle="Tabs without the language property"toc={true}>
125
+
102
126
Tabs **without** the `language` property don't stay in sync with other tabs on your site. In the below example, choosing a language in
103
127
either set of tabs doesn't affect the other set of tabs:
104
128
@@ -137,3 +161,28 @@ either set of tabs doesn't affect the other set of tabs:
137
161
```
138
162
</Tab>
139
163
</Tabs>
164
+
165
+
<CodeBlocktitle="Markdown">
166
+
````jsx
167
+
<Tabs>
168
+
<Tab title="TypeScript">
169
+
```typescript
170
+
console.log("Content inside the TypeScript tab, with no language property");
171
+
```
172
+
</Tab>
173
+
<Tab title="Python">
174
+
```python
175
+
print("Content inside the Python tab, with no language property")
176
+
```
177
+
</Tab>
178
+
<Tab title="Java">
179
+
```java
180
+
System.out.println("Content inside the Java tab, with no language property");
0 commit comments