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/anchor.mdx
+8-4Lines changed: 8 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,9 @@ The `<Anchor>` component creates direct links to specific content like paragraph
14
14
Wrap your content with the `<Anchor>` tag and assign it a custom anchor ID, which you can link to in URLs using the hash symbol (example: `https://website.com/page#data`).
15
15
16
16
<divclassName="highlight-frame">
17
-
<Anchorid="data">This sentence has a custom anchor named `#data`</Anchor>. You can access it via this URL: https://buildwithfern.com/learn/docs/writing-content/components/anchor#data.
17
+
<divclassName="highlight-frame-content">
18
+
<Anchorid="data">This sentence has a custom anchor named `#data`</Anchor>. You can access it via this URL: https://buildwithfern.com/learn/docs/writing-content/components/anchor#data.
19
+
</div>
18
20
</div>
19
21
20
22
```jsx Markdown
@@ -26,17 +28,18 @@ Wrap your content with the `<Anchor>` tag and assign it a custom anchor ID, whic
26
28
### Anchor a table
27
29
28
30
<divclassName="highlight-frame">
31
+
<divclassName="highlight-frame-content">
29
32
<Anchorid="api-endpoints">
30
-
31
33
| Endpoint | Method | Description |
32
34
|----------|--------|-------------|
33
35
|`/plants`| GET | Retrieve all plants |
34
36
|`/plants/:id`| GET | Retrieve a specific plant |
35
37
|`/plants`| POST | Create a new plant |
36
38
37
39
</Anchor>
40
+
<p>You can link directly to the [API endpoints table](#api-endpoints).</p>
41
+
</div>
38
42
39
-
You can link directly to the [API endpoints table](#api-endpoints).
40
43
</div>
41
44
42
45
```jsx Markdown
@@ -56,8 +59,8 @@ You can link directly to the [API endpoints table](#api-endpoints).
56
59
### Anchor a code block
57
60
58
61
<divclassName="highlight-frame">
62
+
<divclassName="highlight-frame-content">
59
63
<Anchorid="example-code">
60
-
61
64
```python
62
65
defwater_plant(plant_id, amount):
63
66
"""Water a plant with specified amount"""
@@ -68,6 +71,7 @@ You can link directly to the [API endpoints table](#api-endpoints).
68
71
```
69
72
Reference the [watering code example](#example-code) in your implementation.
0 commit comments