Skip to content

Commit 5f2ec41

Browse files
committed
docs(components/glass_progress): add Glass Progress docs and preview image
1 parent b2444f5 commit 5f2ec41

File tree

3 files changed

+48
-0
lines changed

3 files changed

+48
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
title: Glass Progress component
3+
order: 16
4+
---
5+
6+
# Glass Progress
7+
8+
```rust
9+
pub fn glass_progress(args: impl Into<GlassProgressArgs>)
10+
```
11+
12+
The `glass_progress` component displays a progress bar indicating the completion progress of a task. It is nearly identical to the `glass_slider` component but is not interactive. Consider it the glass-style variant of the `slider` component.
13+
14+
## Arguments
15+
16+
- `args: impl Into<GlassProgressArgs>`
17+
18+
This argument configures the style of the `glass_progress` component, including size, color, border, and also sets the displayed progress. Use `GlassProgressArgsBuilder` to construct it.
19+
20+
Unlike the `glass_slider` component, `glass_progress` does not place the progress into a separate state struct; the progress is passed directly via arguments because the progress bar is for displaying data rather than modifying it.
21+
22+
## Preview
23+
24+
![glass_progress](/glass_progress_example.png)
2.48 KB
Loading
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
title: Glass Progress 组件
3+
order: 16
4+
---
5+
6+
# Glass Progress
7+
8+
```rust
9+
pub fn glass_progress(args: impl Into<GlassProgressArgs>)
10+
```
11+
12+
`glass_progress` 组件用于显示一个进度条,可以表示任务的完成进度。表示某个任务的完成进度。此组件与 `glass_slider` 组件几乎一致,但不可交互。可以认为它是 `slider` 组件的玻璃风格变体。
13+
14+
## 参数
15+
16+
- `args: impl Into<GlassProgressArgs>`
17+
18+
该参数用于配置 `glass_progress` 组件的样式,包括大小、颜色、边框等,同时也用于设置显示的进度。可以使用 `GlassProgressArgsBuilder` 来构建。
19+
20+
不同于 `glass_slider` 组件,`glass_progress` 没有选择将进度放入一个独立的状态结构体中,而是直接作为参数传入,这是因为进度条用于数据的显示而非修改。
21+
22+
## 预览
23+
24+
![glass_progress](/glass_progress_example.png)

0 commit comments

Comments
 (0)