Skip to content

Commit 0b0ea2f

Browse files
committed
add info about using snippets for constants
1 parent 781509a commit 0b0ea2f

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

fern/products/docs/pages/component-library/custom-components/custom-react-components.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@ title: Custom React Components
33
subtitle: Add your own React components to enhance your docs
44
---
55

6+
<Markdown src="/snippets/pro-plan.mdx"/>
7+
68
You can extend Fern's built-in component library by adding your own custom React components.
79
This allows you to create unique, interactive elements that match your documentation needs.
810

9-
<Note>Setting up custom react components is part of the pro plan.</Note>
11+
<Note title="Defining a constant">Don't use a React component to define a constant. Instead, consider using [reusable snippets](/docs/writing-content/reusable-markdown).</Note>
1012

11-
## How does it work
13+
## How does it work?
1214

1315
<Steps>
1416
### Create a React component

fern/products/docs/pages/component-library/custom-components/reusable-markdown.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ description: Reusable, custom markdown snippets to keep content in sync. Edit on
55

66
Keep your documentation DRY (Don't Repeat Yourself) by defining a reusable Markdown snippet once, and then referencing it in multiple places. This way, you only need to update the snippet in one place to keep all references in sync.
77

8+
Reusable snippets work well for constants (API limits, subscription prices, version numbers), repeated warnings or notes, and standardized formatting blocks.
9+
810
## Create a reusable snippet
911

1012
To use reusable snippets, start by creating a new folder in your `fern` project called `snippets`. Inside the `snippets` folder, create a new Markdown file for each snippet you want to define.

0 commit comments

Comments
 (0)