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
+25-25Lines changed: 25 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,83 +57,83 @@ documentation site with the same language will automatically sync and switch to
57
57
match. Language preferences are stored in client-side local storage and persist
58
58
across browser sessions.
59
59
60
-
Tabs **without** the `language` property don't stay in sync with other tabs on your site. In the below example, choosing a language in
61
-
either set of tabs doesn't affect the other set of tabs:
60
+
In the example below, choosing a language in either set of tabs will automatically update both sets to match:
62
61
63
62
<Tabs>
64
-
<Tabtitle="TypeScript">
63
+
<Tabtitle="TypeScript"language="typescript">
65
64
```typescript
66
65
console.log("First code block!");
67
66
```
68
67
</Tab>
69
-
<Tabtitle="Python">
68
+
<Tabtitle="Python"language="python">
70
69
```python
71
70
print("First code block!")
72
71
```
73
72
</Tab>
74
-
<Tabtitle="Java">
73
+
<Tabtitle="Java"language="java">
75
74
```java
76
75
System.out.println("First code block!");
77
76
```
78
77
</Tab>
79
78
</Tabs>
80
79
81
80
<Tabs>
82
-
<Tabtitle="TypeScript">
81
+
<Tabtitle="TypeScript"language="typescript">
83
82
```typescript
84
-
console.log("Second code block – this won't sync with the one above!");
83
+
console.log("Second code block – language syncs with the one above!");
85
84
```
86
85
</Tab>
87
-
<Tabtitle="Python">
86
+
<Tabtitle="Python"language="python">
88
87
```python
89
-
print("Second code block – this won't sync with the one above!")
88
+
print("Second code block – language syncs with the one above!")
90
89
```
91
90
</Tab>
92
-
<Tabtitle="Java">
91
+
<Tabtitle="Java"language="java">
93
92
```java
94
-
System.out.println("Second code block – this won't sync with the one above!");
93
+
System.out.println("Second code block – language syncs with the one above!");
95
94
```
96
95
</Tab>
97
96
</Tabs>
98
97
99
-
Compare this to tabs **with** the `language` property. Choosing a language in either set below will automatically update both sets to match:
98
+
<Notetitle="Tabs and CodeBlocks integration">
99
+
Language-enabled `Tabs` automatically synchronize with [`CodeBlocks` in that same language](/docs/writing-content/components/code-blocks#language-synchronization).
100
+
</Note>
101
+
102
+
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
+
either set of tabs doesn't affect the other set of tabs:
100
104
101
105
<Tabs>
102
-
<Tabtitle="TypeScript"language="typescript">
106
+
<Tabtitle="TypeScript">
103
107
```typescript
104
108
console.log("First code block!");
105
109
```
106
110
</Tab>
107
-
<Tabtitle="Python"language="python">
111
+
<Tabtitle="Python">
108
112
```python
109
113
print("First code block!")
110
114
```
111
115
</Tab>
112
-
<Tabtitle="Java"language="java">
116
+
<Tabtitle="Java">
113
117
```java
114
118
System.out.println("First code block!");
115
119
```
116
120
</Tab>
117
121
</Tabs>
118
122
119
123
<Tabs>
120
-
<Tabtitle="TypeScript"language="typescript">
124
+
<Tabtitle="TypeScript">
121
125
```typescript
122
-
console.log("Second code block – language syncs with the one above!");
126
+
console.log("Second code block – this won't sync with the one above!");
123
127
```
124
128
</Tab>
125
-
<Tabtitle="Python"language="python">
129
+
<Tabtitle="Python">
126
130
```python
127
-
print("Second code block – language syncs with the one above!")
131
+
print("Second code block – this won't sync with the one above!")
128
132
```
129
133
</Tab>
130
-
<Tabtitle="Java"language="java">
134
+
<Tabtitle="Java">
131
135
```java
132
-
System.out.println("Second code block – language syncs with the one above!");
136
+
System.out.println("Second code block – this won't sync with the one above!");
133
137
```
134
138
</Tab>
135
139
</Tabs>
136
-
137
-
<Notetitle="Tabs and CodeBlocks integration">
138
-
Language-enabled `Tabs` automatically synchronize with [`CodeBlocks` in that same language](/docs/writing-content/components/code-blocks#language-synchronization).
0 commit comments