Remove scroll container from ColorPreference
This commit is contained in:
1 parent
a5394a80cd
commit
a783e9eeda
2 files changed
+11
-8
No files matched your search
-2
@@ -68,8 +68,6 @@ fun ColorPreference(
|
||||
val scope = rememberCoroutineScope()
|
||||
val scrollToPage = { page: Int -> scope.launch { pagerState.animateScrollToPage(page) } }
|
||||
AlertBottomSheetContent(
|
||||
modifier = Modifier
|
||||
.verticalScroll(rememberScrollState()),
|
||||
title = { Text(text = label) },
|
||||
buttons = {
|
||||
Button(
|
||||
|
||||
+11
-6
@@ -40,12 +40,17 @@ fun <T> SwatchGrid(
|
||||
|
||||
Row {
|
||||
entries.slice(indices).forEachIndexed { index, colorOption ->
|
||||
ColorSwatch(
|
||||
entry = colorOption,
|
||||
onClick = { onSwatchClick(colorOption.value) },
|
||||
modifier = Modifier.weight(1F),
|
||||
selected = isSwatchSelected(colorOption.value)
|
||||
)
|
||||
Box(
|
||||
modifier = Modifier.weight(1f),
|
||||
contentAlignment = Alignment.Center
|
||||
) {
|
||||
ColorSwatch(
|
||||
entry = colorOption,
|
||||
onClick = { onSwatchClick(colorOption.value) },
|
||||
modifier = Modifier.widthIn(0.dp, 56.dp),
|
||||
selected = isSwatchSelected(colorOption.value)
|
||||
)
|
||||
}
|
||||
if (index != columnCount - 1) {
|
||||
Spacer(modifier = Modifier.width(gutter))
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user