@@ -5,7 +5,6 @@ import androidx.compose.foundation.layout.PaddingValues
55import androidx.compose.foundation.layout.Row
66import androidx.compose.foundation.layout.Spacer
77import androidx.compose.foundation.layout.fillMaxWidth
8- import androidx.compose.foundation.layout.height
98import androidx.compose.foundation.layout.padding
109import androidx.compose.foundation.layout.width
1110import androidx.compose.foundation.text.KeyboardActions
@@ -26,6 +25,7 @@ import androidx.compose.ui.unit.sp
2625import top.yukonga.miuix.kmp.basic.Button
2726import top.yukonga.miuix.kmp.basic.Card
2827import top.yukonga.miuix.kmp.basic.Slider
28+ import top.yukonga.miuix.kmp.basic.SmallTitle
2929import top.yukonga.miuix.kmp.basic.Text
3030import top.yukonga.miuix.kmp.basic.TextField
3131import top.yukonga.miuix.kmp.theme.MiuixTheme
@@ -42,10 +42,11 @@ fun OtherComponent(padding: PaddingValues) {
4242 var progress by remember { mutableStateOf(0.5f ) }
4343 val progressDisable by remember { mutableStateOf(0.5f ) }
4444
45+ SmallTitle (text = " Button" )
4546 Row (
4647 modifier = Modifier
47- .fillMaxWidth( )
48- .padding(horizontal = 12 .dp, vertical = 12 .dp),
48+ .padding(horizontal = 12 .dp )
49+ .padding(bottom = 12 .dp),
4950 horizontalArrangement = Arrangement .SpaceBetween
5051 ) {
5152 Button (
@@ -71,7 +72,8 @@ fun OtherComponent(padding: PaddingValues) {
7172 Row (
7273 modifier = Modifier
7374 .fillMaxWidth()
74- .padding(horizontal = 12 .dp),
75+ .padding(horizontal = 12 .dp)
76+ .padding(bottom = 12 .dp),
7577 horizontalArrangement = Arrangement .SpaceBetween
7678 ) {
7779 Button (
@@ -91,10 +93,13 @@ fun OtherComponent(padding: PaddingValues) {
9193 )
9294 }
9395
96+ SmallTitle (text = " TextField" )
9497 TextField (
9598 value = text1,
9699 onValueChange = { text1 = it },
97- modifier = Modifier .padding(horizontal = 12 .dp, vertical = 12 .dp),
100+ modifier = Modifier
101+ .padding(horizontal = 12 .dp)
102+ .padding(bottom = 12 .dp),
98103 keyboardActions = KeyboardActions (onDone = { focusManager.clearFocus() }),
99104 keyboardOptions = KeyboardOptions (imeAction = ImeAction .Done )
100105 )
@@ -104,42 +109,45 @@ fun OtherComponent(padding: PaddingValues) {
104109 onValueChange = { text2 = it },
105110 backgroundColor = MiuixTheme .colorScheme.secondaryContainer,
106111 label = " Text Field" ,
107- modifier = Modifier .padding(horizontal = 12 .dp),
112+ modifier = Modifier
113+ .padding(horizontal = 12 .dp)
114+ .padding(bottom = 12 .dp),
108115 keyboardActions = KeyboardActions (onDone = { focusManager.clearFocus() }),
109116 keyboardOptions = KeyboardOptions (imeAction = ImeAction .Done )
110117 )
111118
119+ SmallTitle (text = " Slider" )
112120 Slider (
113121 progress = progress,
114122 onProgressChange = { newProgress -> progress = newProgress },
115- modifier = Modifier .padding(horizontal = 12 .dp, vertical = 12 .dp)
123+ modifier = Modifier
124+ .padding(horizontal = 12 .dp)
125+ .padding(bottom = 12 .dp),
116126 )
117127
118128 Slider (
119129 progress = progressDisable,
120130 onProgressChange = {},
121131 enabled = false ,
122- modifier = Modifier .padding(horizontal = 12 .dp)
132+ modifier = Modifier
133+ .padding(horizontal = 12 .dp)
134+ .padding(bottom = 12 .dp),
123135 )
124136
137+ SmallTitle (text = " Card" )
125138 Card (
126139 modifier = Modifier
127140 .fillMaxWidth()
128- .padding(horizontal = 12 .dp, vertical = 12 .dp),
141+ .padding(horizontal = 12 .dp)
142+ .padding(bottom = 12 .dp),
129143 color = MiuixTheme .colorScheme.primaryVariant,
130144 insideMargin = DpSize (16 .dp, 16 .dp)
131145 ) {
132146 Text (
133147 color = MiuixTheme .colorScheme.onPrimary,
134- text = " Card 123456789 " ,
148+ text = " Card" ,
135149 fontSize = 19 .sp,
136- fontWeight = FontWeight .Bold
137- )
138- Text (
139- color = MiuixTheme .colorScheme.onPrimaryVariant,
140- text = " 一二三四五六七八九" ,
141- fontSize = 15 .sp,
142- fontWeight = FontWeight .Normal
150+ fontWeight = FontWeight .SemiBold
143151 )
144152 }
145153
@@ -150,28 +158,9 @@ fun OtherComponent(padding: PaddingValues) {
150158 .padding(bottom = 12 .dp + padding.calculateBottomPadding()),
151159 insideMargin = DpSize (16 .dp, 16 .dp)
152160 ) {
153- val color = MiuixTheme .colorScheme.onSurface
154- Text (
155- color = color,
156- text = " Card" ,
157- style = MiuixTheme .textStyles.paragraph,
158- fontWeight = FontWeight .SemiBold ,
159- fontSize = 16 .sp
160- )
161- Spacer (Modifier .height(6 .dp))
162- Text (
163- color = color,
164- text = " 123456789" ,
165- style = MiuixTheme .textStyles.paragraph
166- )
167- Text (
168- color = color,
169- text = " 一二三四五六七八九" ,
170- style = MiuixTheme .textStyles.paragraph
171- )
172161 Text (
173- color = color ,
174- text = " !@#$%^&*()_+-= " ,
162+ color = MiuixTheme .colorScheme.onSurface ,
163+ text = " Card \n CardCard \n CardCardCard " ,
175164 style = MiuixTheme .textStyles.paragraph
176165 )
177166 }
0 commit comments