Skip to content

Commit ae9a914

Browse files
committed
add in markdown examples
1 parent f47c3b8 commit ae9a914

File tree

1 file changed

+49
-0
lines changed
  • fern/products/docs/pages/component-library/default-components

1 file changed

+49
-0
lines changed

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

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,34 @@ In the example below, choosing a language in either set of tabs will automatical
9595
</Tab>
9696
</Tabs>
9797

98+
<CodeBlock title="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+
98120
<Note title="Tabs and CodeBlocks integration">
99121
Language-enabled `Tabs` automatically synchronize with [`CodeBlocks` in that same language](/docs/writing-content/components/code-blocks#language-synchronization).
100122
</Note>
101123

124+
<Accordion title="Tabs without the language property" toc={true}>
125+
102126
Tabs **without** the `language` property don't stay in sync with other tabs on your site. In the below example, choosing a language in
103127
either set of tabs doesn't affect the other set of tabs:
104128

@@ -137,3 +161,28 @@ either set of tabs doesn't affect the other set of tabs:
137161
```
138162
</Tab>
139163
</Tabs>
164+
165+
<CodeBlock title="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");
181+
```
182+
</Tab>
183+
</Tabs>
184+
````
185+
</CodeBlock>
186+
187+
</Accordion>
188+

0 commit comments

Comments
 (0)