Skip to content

Commit 8f856c7

Browse files
committed
WIP 17
1 parent a5a323e commit 8f856c7

22 files changed

+1301
-569
lines changed

docs/components/basiccomponent.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -82,33 +82,33 @@ BasicComponent(
8282

8383
### BasicComponent 属性
8484

85-
| 属性名 | 类型 | 默认值 | 说明 |
86-
| ----------------- | ------------------------------- | ---------------------------------------- | -------------------- |
87-
| modifier | Modifier | Modifier | 应用于组件的修饰符 |
88-
| insideMargin | PaddingValues | BasicComponentDefaults.InsideMargin | 组件内部边距 |
89-
| title | String? | null | 组件标题 |
90-
| titleColor | BasicComponentColors | BasicComponentDefaults.titleColor() | 标题颜色配置 |
91-
| summary | String? | null | 组件摘要 |
92-
| summaryColor | BasicComponentColors | BasicComponentDefaults.summaryColor() | 摘要颜色配置 |
93-
| leftAction | @Composable (() -> Unit?)? | null | 组件左侧的可组合内容 |
94-
| rightActions | @Composable RowScope.() -> Unit | {} | 组件右侧的可组合内容 |
95-
| onClick | (() -> Unit)? | null | 点击组件时触发的回调 |
96-
| enabled | Boolean | true | 组件是否可用 |
97-
| interactionSource | MutableInteractionSource | remember { \MutableInteractionSource() } | 组件的交互源 |
85+
| 属性名 | 类型 | 说明 | 默认值 | 是否必须 |
86+
| ----------------- | ------------------------------- | -------------------- | --------------------------------------- | -------- |
87+
| modifier | Modifier | 应用于组件的修饰符 | Modifier | |
88+
| insideMargin | PaddingValues | 组件内部边距 | BasicComponentDefaults.InsideMargin | |
89+
| title | String? | 组件标题 | null | |
90+
| titleColor | BasicComponentColors | 标题颜色配置 | BasicComponentDefaults.titleColor() | |
91+
| summary | String? | 组件摘要 | null | |
92+
| summaryColor | BasicComponentColors | 摘要颜色配置 | BasicComponentDefaults.summaryColor() | |
93+
| leftAction | @Composable (() -> Unit?)? | 组件左侧的可组合内容 | null | |
94+
| rightActions | @Composable RowScope.() -> Unit | 组件右侧的可组合内容 | {} | |
95+
| onClick | (() -> Unit)? | 点击组件时触发的回调 | null | |
96+
| enabled | Boolean | 组件是否可用 | true | |
97+
| interactionSource | MutableInteractionSource | 组件的交互源 | remember \{ MutableInteractionSource() } | |
9898

9999
### BasicComponentDefaults 对象
100100

101101
BasicComponentDefaults 对象提供了 BasicComponent 组件的默认值和颜色配置。
102102

103103
#### 常量
104104

105-
| 常量名 | 类型 | | 说明 |
106-
| ------------ | ------------- | -------------------- | -------------- |
107-
| InsideMargin | PaddingValues | PaddingValues(16.dp) | 组件的内部边距 |
105+
| 常量名 | 类型 | 说明 | 默认值 |
106+
| ------------ | ------------- | -------------- | -------------------- |
107+
| InsideMargin | PaddingValues | 组件的内部边距 | PaddingValues(16.dp) |
108108

109109
#### 方法
110110

111-
| 方法名 | 返回类型 | 说明 |
111+
| 方法名 | 类型 | 说明 |
112112
| -------------- | -------------------- | ---------------- |
113113
| titleColor() | BasicComponentColors | 创建标题颜色配置 |
114114
| summaryColor() | BasicComponentColors | 创建摘要颜色配置 |

docs/components/button.md

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -72,48 +72,48 @@ Button(
7272

7373
### Button 属性
7474

75-
| 属性名 | 类型 | 默认值 | 说明 |
76-
| ------------ | ------------------------------- | ----------------------------- | ------------------------ |
77-
| onClick | () -> Unit | - | 点击按钮时触发的回调 |
78-
| modifier | Modifier | Modifier | 应用于按钮的修饰符 |
79-
| enabled | Boolean | true | 按钮是否可点击 |
80-
| cornerRadius | Dp | ButtonDefaults.CornerRadius | 按钮圆角半径 |
81-
| minWidth | Dp | ButtonDefaults.MinWidth | 按钮最小宽度 |
82-
| minHeight | Dp | ButtonDefaults.MinHeight | 按钮最小高度 |
83-
| colors | ButtonColors | ButtonDefaults.buttonColors() | 按钮颜色配置 |
84-
| insideMargin | PaddingValues | ButtonDefaults.InsideMargin | 按钮内部边距 |
85-
| content | @Composable RowScope.() -> Unit | - | 按钮内容区域的可组合函数 |
75+
| 属性名 | 类型 | 说明 | 默认值 | 是否必须 |
76+
| ------------ | ------------------------------- | ------------------------ | ----------------------------- | -------- |
77+
| onClick | () -> Unit | 点击按钮时触发的回调 | - | |
78+
| modifier | Modifier | 应用于按钮的修饰符 | Modifier | |
79+
| enabled | Boolean | 按钮是否可点击 | true | |
80+
| cornerRadius | Dp | 按钮圆角半径 | ButtonDefaults.CornerRadius | |
81+
| minWidth | Dp | 按钮最小宽度 | ButtonDefaults.MinWidth | |
82+
| minHeight | Dp | 按钮最小高度 | ButtonDefaults.MinHeight | |
83+
| colors | ButtonColors | 按钮颜色配置 | ButtonDefaults.buttonColors() | |
84+
| insideMargin | PaddingValues | 按钮内部边距 | ButtonDefaults.InsideMargin | |
85+
| content | @Composable RowScope.() -> Unit | 按钮内容区域的可组合函数 | - | |
8686

8787
### TextButton 属性
8888

89-
| 属性名 | 类型 | 默认值 | 说明 |
90-
| ------------ | ---------------- | --------------------------------- | -------------------- |
91-
| text | String | - | 按钮显示的文本 |
92-
| onClick | () -> Unit | - | 点击按钮时触发的回调 |
93-
| modifier | Modifier | Modifier | 应用于按钮的修饰符 |
94-
| enabled | Boolean | true | 按钮是否可点击 |
95-
| colors | TextButtonColors | ButtonDefaults.textButtonColors() | 文本按钮颜色配置 |
96-
| cornerRadius | Dp | ButtonDefaults.CornerRadius | 按钮圆角半径 |
97-
| minWidth | Dp | ButtonDefaults.MinWidth | 按钮最小宽度 |
98-
| minHeight | Dp | ButtonDefaults.MinHeight | 按钮最小高度 |
99-
| insideMargin | PaddingValues | ButtonDefaults.InsideMargin | 按钮内部边距 |
89+
| 属性名 | 类型 | 说明 | 默认值 | 是否必须 |
90+
| ------------ | ---------------- | -------------------- | --------------------------------- | -------- |
91+
| text | String | 按钮显示的文本 | - | |
92+
| onClick | () -> Unit | 点击按钮时触发的回调 | - | |
93+
| modifier | Modifier | 应用于按钮的修饰符 | Modifier | |
94+
| enabled | Boolean | 按钮是否可点击 | true | |
95+
| colors | TextButtonColors | 文本按钮颜色配置 | ButtonDefaults.textButtonColors() | |
96+
| cornerRadius | Dp | 按钮圆角半径 | ButtonDefaults.CornerRadius | |
97+
| minWidth | Dp | 按钮最小宽度 | ButtonDefaults.MinWidth | |
98+
| minHeight | Dp | 按钮最小高度 | ButtonDefaults.MinHeight | |
99+
| insideMargin | PaddingValues | 按钮内部边距 | ButtonDefaults.InsideMargin | |
100100

101101
### ButtonDefaults 对象
102102

103103
ButtonDefaults 对象提供了按钮组件的默认值和颜色配置。
104104

105105
#### 常量
106106

107-
| 常量名 | 类型 | | 说明 |
108-
| ------------ | ------------- | -------------------- | -------------- |
109-
| MinWidth | Dp | 58.dp | 按钮的最小宽度 |
110-
| MinHeight | Dp | 40.dp | 按钮的最小高度 |
111-
| CornerRadius | Dp | 16.dp | 按钮的圆角半径 |
112-
| InsideMargin | PaddingValues | PaddingValues(16.dp) | 按钮的内部边距 |
107+
| 常量名 | 类型 | 说明 | 默认值 |
108+
| ------------ | ------------- | -------------- | -------------------- |
109+
| MinWidth | Dp | 按钮的最小宽度 | 58.dp |
110+
| MinHeight | Dp | 按钮的最小高度 | 40.dp |
111+
| CornerRadius | Dp | 按钮的圆角半径 | 16.dp |
112+
| InsideMargin | PaddingValues | 按钮的内部边距 | PaddingValues(16.dp) |
113113

114114
#### 方法
115115

116-
| 方法名 | 返回类型 | 说明 |
116+
| 方法名 | 类型 | 说明 |
117117
| ------------------------- | ---------------- | -------------------------- |
118118
| buttonColors() | ButtonColors | 创建次要按钮的颜色配置 |
119119
| buttonColorsPrimary() | ButtonColors | 创建主要按钮的颜色配置 |

docs/components/card.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,30 +22,30 @@ Card {
2222

2323
### Card 属性
2424

25-
| 属性名 | 类型 | 默认值 | 说明 |
26-
| ------------ | ---------------------------------- | --------------------------- | ------------------------ |
27-
| modifier | Modifier | Modifier | 应用于卡片的修饰符 |
28-
| cornerRadius | Dp | CardDefaults.CornerRadius | 卡片圆角半径 |
29-
| insideMargin | PaddingValues | CardDefaults.InsideMargin | 卡片内部边距 |
30-
| color | Color | CardDefaults.DefaultColor() | 卡片背景颜色 |
31-
| content | @Composable ColumnScope.() -> Unit | - | 卡片内容区域的可组合函数 |
25+
| 属性名 | 类型 | 说明 | 默认值 | 是否必须 |
26+
| ------------ | ---------------------------------- | ------------------------ | --------------------------- | -------- |
27+
| modifier | Modifier | 应用于卡片的修饰符 | Modifier | |
28+
| cornerRadius | Dp | 卡片圆角半径 | CardDefaults.CornerRadius | |
29+
| insideMargin | PaddingValues | 卡片内部边距 | CardDefaults.InsideMargin | |
30+
| color | Color | 卡片背景颜色 | CardDefaults.DefaultColor() | |
31+
| content | @Composable ColumnScope.() -> Unit | 卡片内容区域的可组合函数 | - | |
3232

3333
### CardDefaults 对象
3434

3535
CardDefaults 对象提供了卡片组件的默认值和颜色配置。
3636

3737
#### 常量
3838

39-
| 常量名 | 类型 | | 说明 |
40-
| ------------ | ------------- | ------------------- | -------------- |
41-
| CornerRadius | Dp | 16.dp | 卡片的圆角半径 |
42-
| InsideMargin | PaddingValues | PaddingValues(0.dp) | 卡片的内部边距 |
39+
| 常量名 | 类型 | 说明 | 默认值 |
40+
| ------------ | ------------- | -------------- | ------------------- |
41+
| CornerRadius | Dp | 卡片的圆角半径 | 16.dp |
42+
| InsideMargin | PaddingValues | 卡片的内部边距 | PaddingValues(0.dp) |
4343

4444
#### 方法
4545

46-
| 方法名 | 返回类型 | 说明 |
47-
| -------------- | -------- | ------------------ |
48-
| DefaultColor() | Color | 创建卡片的默认颜色 |
46+
| 方法名 | 类型 | 说明 |
47+
| -------------- | ----- | ------------------ |
48+
| DefaultColor() | Color | 创建卡片的默认颜色 |
4949

5050
## 进阶用法
5151

docs/components/checkbox.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -37,36 +37,36 @@ Checkbox(
3737

3838
### Checkbox 属性
3939

40-
| 属性名 | 类型 | 默认值 | 说明 |
41-
| --------------- | -------------------- | -------------------------------- | ------------------------ |
42-
| checked | Boolean | - | 复选框是否处于选中状态 |
43-
| onCheckedChange | ((Boolean) -> Unit)? | - | 选中状态变化时的回调函数 |
44-
| modifier | Modifier | Modifier | 应用于复选框的修饰符 |
45-
| colors | CheckboxColors | CheckboxDefaults.checkboxColors() | 复选框的颜色配置 |
46-
| enabled | Boolean | true | 复选框是否可交互 |
40+
| 属性名 | 类型 | 说明 | 默认值 | 是否必须 |
41+
| --------------- | -------------------- | ------------------------ | --------------------------------- | -------- |
42+
| checked | Boolean | 复选框是否处于选中状态 | - | |
43+
| onCheckedChange | ((Boolean) -> Unit)? | 选中状态变化时的回调函数 | - | |
44+
| modifier | Modifier | 应用于复选框的修饰符 | Modifier | |
45+
| colors | CheckboxColors | 复选框的颜色配置 | CheckboxDefaults.checkboxColors() | |
46+
| enabled | Boolean | 复选框是否可交互 | true | |
4747

4848
### CheckboxDefaults 对象
4949

5050
CheckboxDefaults 对象提供了 Checkbox 组件的默认颜色配置。
5151

5252
#### 方法
5353

54-
| 方法名 | 返回类型 | 说明 |
55-
| --------------- | ------------- | ------------------------ |
54+
| 方法名 | 类型 | 说明 |
55+
| ---------------- | -------------- | ------------------------ |
5656
| checkboxColors() | CheckboxColors | 创建复选框的默认颜色配置 |
5757

5858
### CheckboxColors 类
5959

60-
| 属性名 | 类型 | 说明 |
61-
| ----------------------------- | ----- | ------------------------------ |
62-
| checkedForegroundColor | Color | 选中状态时前景色(对勾颜色) |
63-
| uncheckedForegroundColor | Color | 未选中状态时前景色 |
64-
| disabledCheckedForegroundColor| Color | 禁用且选中状态时前景色 |
65-
| disabledUncheckedForegroundColor| Color | 禁用且未选中状态时前景色 |
66-
| checkedBackgroundColor | Color | 选中状态时背景色 |
67-
| uncheckedBackgroundColor | Color | 未选中状态时背景色 |
68-
| disabledCheckedBackgroundColor| Color | 禁用且选中状态时背景色 |
69-
| disabledUncheckedBackgroundColor| Color | 禁用且未选中状态时背景色 |
60+
| 属性名 | 类型 | 说明 |
61+
| -------------------------------- | ----- | ---------------------------- |
62+
| checkedForegroundColor | Color | 选中状态时前景色(对勾颜色) |
63+
| uncheckedForegroundColor | Color | 未选中状态时前景色 |
64+
| disabledCheckedForegroundColor | Color | 禁用且选中状态时前景色 |
65+
| disabledUncheckedForegroundColor | Color | 禁用且未选中状态时前景色 |
66+
| checkedBackgroundColor | Color | 选中状态时背景色 |
67+
| uncheckedBackgroundColor | Color | 未选中状态时背景色 |
68+
| disabledCheckedBackgroundColor | Color | 禁用且选中状态时背景色 |
69+
| disabledUncheckedBackgroundColor | Color | 禁用且未选中状态时背景色 |
7070

7171
## 进阶用法
7272

0 commit comments

Comments
 (0)