Skip to content

Commit a3789a2

Browse files
dks333handotdev
andauthored
feat: Update component for changelogs (#304)
* add changelog * Update component * Update codeblocks to auto --------- Co-authored-by: Han Wang <[email protected]>
1 parent 984a6b1 commit a3789a2

File tree

2 files changed

+59
-1
lines changed

2 files changed

+59
-1
lines changed

content/components/update.mdx

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
title: "Update"
3+
description: "Keep track of changes and updates"
4+
icon: "rectangle-history"
5+
---
6+
7+
The `Update` component is used to keep track of changes and updates.
8+
9+
<Update label="2024-10-12" description="v0.1.1">
10+
<Frame>
11+
<img
12+
className="block"
13+
src="https://mintlify-assets.b-cdn.net/hero-light.png"
14+
/>
15+
</Frame>
16+
17+
## Changelog
18+
19+
You can add anything here, like a screenshot, a code snippet, or a list of changes.
20+
21+
#### Features
22+
- Responsive design
23+
- Sticky section for each changelog
24+
</Update>
25+
26+
<Update label="2024-10-11" description="v0.1.0">
27+
### How to use
28+
```md
29+
<Update label="2024-10-12" description="v0.1.1">
30+
This is how you use a changelog with a label
31+
and a description.
32+
</Update>
33+
<Update label="2024-10-11" description="v0.1.0">
34+
This is how you use a changelog with a label
35+
and a description.
36+
</Update>
37+
```
38+
39+
You can use multiple `Update` components to create changelogs.
40+
</Update>
41+
42+
<Tip>
43+
Each `label` creates an anchor and also shows up on the table of contents on the right.
44+
</Tip>
45+
46+
## Props
47+
48+
<ResponseField name="label" type="string" required>
49+
Label in the changelog, on the sticky left side.
50+
</ResponseField>
51+
52+
<ResponseField name="description" type="string">
53+
Description below the label in the Changelog preview.
54+
</ResponseField>

mint.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@
3939
"style": "roundedRectangle",
4040
"arrow": false
4141
},
42+
"codeBlock": {
43+
"mode": "auto"
44+
},
4245
"feedback": {
4346
"thumbsRating": true,
4447
"suggestEdit": true
@@ -203,7 +206,8 @@
203206
"content/components/mermaid-diagrams",
204207
"content/components/steps",
205208
"content/components/tabs",
206-
"content/components/tooltips"
209+
"content/components/tooltips",
210+
"content/components/update"
207211
]
208212
},
209213
{

0 commit comments

Comments
 (0)