File tree Expand file tree Collapse file tree
miuix-ui/src/commonMain/kotlin/top/yukonga/miuix/kmp/basic Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -103,6 +103,7 @@ Button(
103103| minHeight | Dp | Minimum height of the button | ButtonDefaults.MinHeight | No |
104104| colors | TextButtonColors | Text button color configuration | ButtonDefaults.textButtonColors() | No |
105105| insideMargin | PaddingValues | Internal padding of the button | ButtonDefaults.InsideMargin | No |
106+ | textStyle | TextStyle? | Text style of the button text | null (MiuixTheme.textStyles.button)| No |
106107| interactionSource | MutableInteractionSource? | Interaction source for the button | null | No |
107108| indication | Indication? | Indication for click interactions | LocalIndication.current | No |
108109
Original file line number Diff line number Diff line change @@ -103,6 +103,7 @@ Button(
103103| minHeight | Dp | 按钮最小高度 | ButtonDefaults.MinHeight | 否 |
104104| colors | TextButtonColors | 文本按钮颜色配置 | ButtonDefaults.textButtonColors() | 否 |
105105| insideMargin | PaddingValues | 按钮内部边距 | ButtonDefaults.InsideMargin | 否 |
106+ | textStyle | TextStyle? | 按钮文本的文本样式 | null(MiuixTheme.textStyles.button)| 否 |
106107| interactionSource | MutableInteractionSource? | 按钮的交互源 | null | 否 |
107108| indication | Indication? | 点击交互的反馈效果 | LocalIndication.current | 否 |
108109
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ import androidx.compose.ui.graphics.Color
2424import androidx.compose.ui.semantics.Role
2525import androidx.compose.ui.semantics.role
2626import androidx.compose.ui.semantics.semantics
27+ import androidx.compose.ui.text.TextStyle
2728import androidx.compose.ui.unit.Dp
2829import androidx.compose.ui.unit.dp
2930import top.yukonga.miuix.kmp.squircle.squircleSurface
@@ -117,6 +118,7 @@ fun TextButton(
117118 minHeight : Dp = ButtonDefaults .MinHeight ,
118119 colors : TextButtonColors = ButtonDefaults .textButtonColors(),
119120 insideMargin : PaddingValues = ButtonDefaults .InsideMargin ,
121+ textStyle : TextStyle ? = null,
120122 interactionSource : MutableInteractionSource ? = null,
121123 indication : Indication ? = LocalIndication .current,
122124) {
@@ -142,7 +144,7 @@ fun TextButton(
142144 ) {
143145 Text (
144146 text = text,
145- style = MiuixTheme .textStyles.button,
147+ style = textStyle ? : MiuixTheme .textStyles.button,
146148 )
147149 }
148150}
You can’t perform that action at this time.
0 commit comments