Skip to content

Commit 5bc45f5

Browse files
committed
docs(components): fix formatting and indentation in Button, Surface, and Text component documentation
1 parent 3479851 commit 5bc45f5

File tree

6 files changed

+14
-14
lines changed

6 files changed

+14
-14
lines changed

docs/en/components/button.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ The `button` component is a button typically used to trigger an action. It can c
1919

2020
- `args: impl Into<ButtonArgs>`
2121

22-
This argument configures the style and behavior of the `button` component, including background color, border, shadow, corner radius, etc. Use `ButtonArgsBuilder` to construct this argument.
22+
This argument configures the style and behavior of the `button` component, including background color, border, shadow, corner radius, etc. Use `ButtonArgsBuilder` to construct this argument.
2323

2424
- `ripple_state: Arc<RippleState>`
2525

26-
The state for the click ripple animation. You must provide a valid `RippleState` instance to enable the ripple animation. This differs from the `surface` component, whose `ripple_state` parameter can be passed as `None` to disable the ripple.
26+
The state for the click ripple animation. You must provide a valid `RippleState` instance to enable the ripple animation. This differs from the `surface` component, whose `ripple_state` parameter can be passed as `None` to disable the ripple.
2727

2828
- `child: impl FnOnce()`
2929

30-
The child component of the `button`, which can be any `#[tessera]` function.
30+
The child component of the `button`, which can be any `#[tessera]` function.
3131

3232
## Preview
3333

docs/en/components/surface.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ The child component of `surface`, can be any `#[tessera]` function.
3131

3232
## Preview
3333

34-
![surface](/surface_example.png)
34+
![surface](/surface_example.png)

docs/en/components/text.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ The `text` component is used to display textual content.
1515

1616
- `args: impl Into<TextArgs>`
1717

18-
This argument configures the style of the `text` component, including content, font size, color, alignment, and other properties. You can build it via `TextArgsBuilder`.
18+
This argument configures the style of the `text` component, including content, font size, color, alignment, and other properties. You can build it via `TextArgsBuilder`.
1919

20-
Note that since `Into<TextArgs>` is implemented for types like `str` and `String`, you can use the shorthand `text("Hello, World!")`.
20+
Note that since `Into<TextArgs>` is implemented for types like `str` and `String`, you can use the shorthand `text("Hello, World!")`.

docs/zhHans/components/button.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ pub fn button(
1919

2020
- `args: impl Into<ButtonArgs>`
2121

22-
此参数用于配置`button`组件的样式和行为,包括背景颜色、边框、阴影、圆角等属性。可以通过`ButtonArgsBuilder`来构建这个参数。
22+
此参数用于配置`button`组件的样式和行为,包括背景颜色、边框、阴影、圆角等属性。可以通过`ButtonArgsBuilder`来构建这个参数。
2323

2424
- `ripple_state: Arc<RippleState>`
2525

26-
此参数为点击水波纹动画的状态,必须传入一个有效的`RippleState`实例,以启用水波纹动画效果。这点不同于`surface`组件,其`ripple_state`参数可以传入`None`来禁用水波纹动画。
26+
此参数为点击水波纹动画的状态,必须传入一个有效的`RippleState`实例,以启用水波纹动画效果。这点不同于`surface`组件,其`ripple_state`参数可以传入`None`来禁用水波纹动画。
2727

2828
- `child: impl FnOnce()`
2929

30-
此参数为`button`组件的子组件,可以是任何`#[tessera]`函数。
30+
此参数为`button`组件的子组件,可以是任何`#[tessera]`函数。
3131

3232
## 预览
3333

docs/zhHans/components/surface.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ pub fn surface(
1919

2020
- `args: SurfaceArgs`
2121

22-
此参数用于配置`surface`组件的样式和行为,包括背景颜色、边框、阴影、圆角等属性。可以通过`SurfaceArgsBuilder`来构建这个参数。
22+
此参数用于配置`surface`组件的样式和行为,包括背景颜色、边框、阴影、圆角等属性。可以通过`SurfaceArgsBuilder`来构建这个参数。
2323

2424
- `ripple_state: Option<Arc<RippleState>>`
2525

26-
此参数为点击水波纹动画的状态,如果传入`None`,则表示不启用水波纹动画。
26+
此参数为点击水波纹动画的状态,如果传入`None`,则表示不启用水波纹动画。
2727

2828
- `child: impl FnOnce()`
2929

30-
此参数为`surface`组件的子组件,可以是任何`#[tessera]`函数。
30+
此参数为`surface`组件的子组件,可以是任何`#[tessera]`函数。
3131

3232
## 预览
3333

docs/zhHans/components/text.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ pub fn text(args: impl Into<TextArgs>)
1515

1616
- `args: impl Into<TextArgs>`
1717

18-
此参数用于配置`text`组件的样式,包括文本内容、字体大小、颜色、对齐方式等属性。可以通过`TextArgsBuilder`来构建这个参数。
18+
此参数用于配置`text`组件的样式,包括文本内容、字体大小、颜色、对齐方式等属性。可以通过`TextArgsBuilder`来构建这个参数。
1919

20-
值得一提的是,由于为`str`、`String`等类型实现了`Into<TextArgs>`,因此可以使用`text("Hello, World!")`这样的简便写法。
20+
值得一提的是,由于为`str`、`String`等类型实现了`Into<TextArgs>`,因此可以使用`text("Hello, World!")`这样的简便写法。

0 commit comments

Comments
 (0)