Skip to content

Commit f979951

Browse files
committed
add example without sync
1 parent 16b75b5 commit f979951

File tree

1 file changed

+40
-2
lines changed
  • fern/products/docs/pages/component-library/default-components

1 file changed

+40
-2
lines changed

fern/products/docs/pages/component-library/default-components/tabs.mdx

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,46 @@ documentation site with the same language will automatically sync and switch to
5757
match. Language preferences are stored in client-side local storage and persist
5858
across browser sessions.
5959

60-
The example below demonstrates language sync in action – choosing a language in
61-
either set of tabs will automatically update both sets to match:
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:
62+
63+
<Tabs>
64+
<Tab title="TypeScript">
65+
```typescript
66+
console.log("First code block!");
67+
```
68+
</Tab>
69+
<Tab title="Python">
70+
```python
71+
print("First code block!")
72+
```
73+
</Tab>
74+
<Tab title="Java">
75+
```java
76+
System.out.println("First code block!");
77+
```
78+
</Tab>
79+
</Tabs>
80+
81+
<Tabs>
82+
<Tab title="TypeScript">
83+
```typescript
84+
console.log("Second code block – this won't sync with the one above!");
85+
```
86+
</Tab>
87+
<Tab title="Python">
88+
```python
89+
print("Second code block – this won't sync with the one above!")
90+
```
91+
</Tab>
92+
<Tab title="Java">
93+
```java
94+
System.out.println("Second code block – this won't sync with the one above!");
95+
```
96+
</Tab>
97+
</Tabs>
98+
99+
Compare this to tabs **with** the `language` property. Choosing a language in either set below will automatically update both sets to match:
62100

63101
<Tabs>
64102
<Tab title="TypeScript" language="typescript">

0 commit comments

Comments
 (0)