Skip to content

Commit

Permalink
fix(local search): chip color
Browse files Browse the repository at this point in the history
  • Loading branch information
z-huang authored and Malopieds committed Aug 23, 2024
1 parent eb3754a commit b8e958e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.unit.dp

@Composable
Expand All @@ -20,6 +21,7 @@ fun <E> ChipsRow(
currentValue: E,
onValueUpdate: (E) -> Unit,
modifier: Modifier = Modifier,
containerColor: Color = MaterialTheme.colorScheme.surface,
) {
Row(
modifier =
Expand All @@ -33,7 +35,7 @@ fun <E> ChipsRow(
FilterChip(
label = { Text(label) },
selected = currentValue == value,
colors = FilterChipDefaults.filterChipColors(containerColor = MaterialTheme.colorScheme.surface),
colors = FilterChipDefaults.filterChipColors(containerColor = containerColor),
onClick = { onValueUpdate(value) },
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ fun LocalSearchScreen(
),
currentValue = searchFilter,
onValueUpdate = { viewModel.filter.value = it },
containerColor = MaterialTheme.colorScheme.surfaceContainerHigh,
)

LazyColumn(
Expand Down

0 comments on commit b8e958e

Please sign in to comment.