Skip to content

Commit 6782d0f

Browse files
committed
Add progress bar docs
1 parent 55edec5 commit 6782d0f

File tree

4 files changed

+53
-0
lines changed

4 files changed

+53
-0
lines changed

astro.config.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ export default defineConfig({
102102
{ label: "Icon", link: "components/icon" },
103103
{ label: "Label", link: "components/label" },
104104
{ label: "Option", link: "components/option" },
105+
{ label: "ProgressBar", link: "components/progress-bar" },
105106
{ label: "ProgressRing", link: "components/progress-ring" },
106107
{ label: "Radio", link: "components/radio" },
107108
{ label: "RadioGroup", link: "components/radio-group" },
@@ -177,6 +178,7 @@ export default defineConfig({
177178
{ label: "Icon", link: "components/icon/api" },
178179
{ label: "Label", link: "components/label/api" },
179180
{ label: "Option", link: "components/option/api" },
181+
{ label: "ProgressBar", link: "components/progress-bar/api" },
180182
{ label: "ProgressRing", link: "components/progress-ring/api" },
181183
{ label: "Radio", link: "components/radio/api" },
182184
{ label: "RadioGroup", link: "components/radio-group/api" },
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<script>
2+
import "@vscode-elements/elements/dist/vscode-progress-bar/index.js";
3+
</script>
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
title: Progress Bar
3+
---
4+
5+
import Demo from "@components/Demo.astro";
6+
import PageSwitcher from "@components/PageSwitcher.astro";
7+
import Imports from "@components/examples/progress-bar/Imports.astro";
8+
9+
<Imports />
10+
<PageSwitcher />
11+
12+
## Basic example
13+
14+
<Demo>
15+
<vscode-progress-bar></vscode-progress-bar>
16+
<Fragment slot="html">
17+
```html
18+
<vscode-progress-bar></vscode-progress-bar>
19+
```
20+
</Fragment>
21+
</Demo>
22+
23+
## Long running threshold
24+
25+
Switches to a gentler animation after a while in indeterminate mode, consuming fewer resources.
26+
27+
<Demo>
28+
<vscode-progress-bar long-running-threshold="1000"></vscode-progress-bar>
29+
<Fragment slot="html">
30+
```html 'long-running-threshold="1000"'
31+
<vscode-progress-bar long-running-threshold="1000"></vscode-progress-bar>
32+
```
33+
</Fragment>
34+
</Demo>
35+
36+
## Determinate mode
37+
38+
Set a specific value. The `max` value is optional, its default value is 100.
39+
40+
<Demo>
41+
<vscode-progress-bar max="100" value="70"></vscode-progress-bar>
42+
<Fragment slot="html">
43+
```html 'value="70"'
44+
<vscode-progress-bar max="100" value="70"></vscode-progress-bar>
45+
```
46+
</Fragment>
47+
</Demo>

src/pages/components/[component]/api.astro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export function getStaticPaths() {
1919
{ params: { component: "label" } },
2020
{ params: { component: "multi-select" } },
2121
{ params: { component: "option" } },
22+
{ params: { component: "progress-bar" } },
2223
{ params: { component: "progress-ring" } },
2324
{ params: { component: "radio" } },
2425
{ params: { component: "radio-group" } },

0 commit comments

Comments
 (0)