Skip to content

Commit c8c36c4

Browse files
committed
clean up param field formatting
1 parent 5b4580b commit c8c36c4

File tree

1 file changed

+42
-36
lines changed

1 file changed

+42
-36
lines changed

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

Lines changed: 42 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,47 @@ title: 'Parameters'
33
description: 'Display API parameter information with metadata like type, requirements, and descriptions'
44
---
55

6-
The `ParamField` component helps document API parameters and properties with consistent formatting. It displays the parameter name, type, requirements, and description in a structured layout.
6+
The `ParamField` component documents API parameters and properties with consistent formatting. It displays the parameter name, type, requirements, and description in a structured layout.
7+
8+
9+
<Tabs>
10+
<Tab title="Example">
11+
<ParamField path="username" type="string" required={true}>
12+
The user's display name
13+
</ParamField>
14+
15+
<ParamField path="limit" type="number" default="50">
16+
Maximum number of items to return
17+
</ParamField>
18+
19+
<ParamField path="api_key" type="string" deprecated={true}>
20+
Use OAuth authentication instead
21+
</ParamField>
22+
23+
<ParamField path="status" type="'active' | 'inactive' | 'pending'" default="active">
24+
The current status of the user account
25+
</ParamField>
26+
</Tab>
27+
<Tab title="Markdown">
28+
```jsx
29+
<ParamField path="username" type="string" required={true}>
30+
The user's display name
31+
</ParamField>
32+
33+
<ParamField path="limit" type="number" default="50">
34+
Maximum number of items to return
35+
</ParamField>
36+
37+
<ParamField path="api_key" type="string" deprecated={true}>
38+
Use OAuth authentication instead
39+
</ParamField>
40+
41+
<ParamField path="status" type="'active' | 'inactive' | 'pending'" default="active">
42+
The current status of the user account
43+
</ParamField>
44+
```
45+
</Tab>
46+
</Tabs>
747
848
## Properties
949
@@ -24,39 +64,5 @@ The `ParamField` component helps document API parameters and properties with con
2464
</ParamField>
2565
2666
<ParamField path="deprecated" type="boolean" required={false}>
27-
Marks the parameter as deprecated. Shows a "Deprecated" warning when true.
67+
Marks the parameter as deprecated.
2868
</ParamField>
29-
30-
<Aside>
31-
## Example
32-
<Tabs>
33-
<Tab title="Example">
34-
<ParamField path="username" type="string" required={true}>
35-
The user's display name
36-
</ParamField>
37-
38-
<ParamField path="limit" type="number" default="50">
39-
Maximum number of items to return
40-
</ParamField>
41-
42-
<ParamField path="api_key" type="string" deprecated={true}>
43-
Use OAuth authentication instead
44-
</ParamField>
45-
</Tab>
46-
<Tab title="Markdown">
47-
```jsx
48-
<ParamField path="username" type="string" required={true}>
49-
The user's display name
50-
</ParamField>
51-
52-
<ParamField path="limit" type="number" default="50">
53-
Maximum number of items to return
54-
</ParamField>
55-
56-
<ParamField path="api_key" type="string" deprecated={true}>
57-
Use OAuth authentication instead
58-
</ParamField>
59-
```
60-
</Tab>
61-
</Tabs>
62-
</Aside>

0 commit comments

Comments
 (0)