File tree Expand file tree Collapse file tree 6 files changed +245
-163
lines changed
java/com/shub39/rush/presentation Expand file tree Collapse file tree 6 files changed +245
-163
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ private const val endCornerRadius = 16
2929
3030@Composable
3131fun listItemColors (): ListItemColors {
32- return ListItemDefaults .colors(containerColor = MaterialTheme .colorScheme.surfaceContainerHigh )
32+ return ListItemDefaults .colors(containerColor = MaterialTheme .colorScheme.surfaceContainerHighest )
3333}
3434
3535fun leadingItemShape (): Shape =
Original file line number Diff line number Diff line change 1+ package com.shub39.rush.presentation.components
2+
3+ import androidx.compose.foundation.layout.Column
4+ import androidx.compose.foundation.layout.ColumnScope
5+ import androidx.compose.foundation.layout.padding
6+ import androidx.compose.foundation.shape.RoundedCornerShape
7+ import androidx.compose.material3.Card
8+ import androidx.compose.material3.CardColors
9+ import androidx.compose.material3.CardDefaults
10+ import androidx.compose.runtime.Composable
11+ import androidx.compose.ui.Modifier
12+ import androidx.compose.ui.graphics.Shape
13+ import androidx.compose.ui.unit.dp
14+
15+ @Composable
16+ fun ListItemCard (
17+ modifier : Modifier = Modifier ,
18+ shape : Shape = RoundedCornerShape (4.dp),
19+ colors : CardColors = CardDefaults .cardColors(),
20+ content : @Composable (ColumnScope .() -> Unit )
21+ ) {
22+ Card (
23+ modifier = modifier,
24+ shape = shape,
25+ colors = colors,
26+ ) {
27+ Column (
28+ modifier = Modifier .padding(16 .dp),
29+ content = content
30+ )
31+ }
32+ }
Original file line number Diff line number Diff line change @@ -57,23 +57,21 @@ fun <T> ListSelect(
5757) {
5858 Column (
5959 modifier = modifier.fillMaxWidth(),
60- horizontalAlignment = Alignment .CenterHorizontally ,
6160 verticalArrangement = Arrangement .spacedBy(8 .dp),
6261 ) {
6362 Text (
6463 text = title,
65- style = MaterialTheme .typography.titleLarge,
66- textAlign = TextAlign .Center ,
64+ style = MaterialTheme .typography.titleMedium,
6765 )
6866
69- FlowRow (horizontalArrangement = Arrangement . Center ) {
67+ FlowRow {
7068 options.forEach { option ->
7169 ToggleButton (
7270 checked = option == selected,
7371 onCheckedChange = { onSelectedChange(option) },
7472 content = { labelProvider(option) },
7573 colors = ToggleButtonDefaults .tonalToggleButtonColors(),
76- modifier = Modifier .padding(horizontal = 4 .dp),
74+ modifier = Modifier .padding(horizontal = 2 .dp),
7775 )
7876 }
7977 }
You can’t perform that action at this time.
0 commit comments