fix: SearchBar text color
This commit is contained in:
@@ -14,6 +14,7 @@ import androidx.compose.material.icons.Icons
|
|||||||
import androidx.compose.material.icons.filled.Menu
|
import androidx.compose.material.icons.filled.Menu
|
||||||
import androidx.compose.material.icons.filled.Search
|
import androidx.compose.material.icons.filled.Search
|
||||||
import androidx.compose.material3.Icon
|
import androidx.compose.material3.Icon
|
||||||
|
import androidx.compose.material3.MaterialTheme
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.runtime.getValue
|
import androidx.compose.runtime.getValue
|
||||||
import androidx.compose.runtime.mutableStateOf
|
import androidx.compose.runtime.mutableStateOf
|
||||||
@@ -37,7 +38,7 @@ fun SearchBar(searchTarget: String = "", searchEvent: (String) -> Unit) {
|
|||||||
.padding(horizontal = 24.dp)
|
.padding(horizontal = 24.dp)
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.height(56.dp)
|
.height(56.dp)
|
||||||
.background(Color.White, shape = RoundedCornerShape(56.dp)),
|
.background(MaterialTheme.colorScheme.onPrimary, shape = RoundedCornerShape(56.dp)),
|
||||||
verticalAlignment = Alignment.CenterVertically
|
verticalAlignment = Alignment.CenterVertically
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
@@ -58,7 +59,7 @@ fun SearchBar(searchTarget: String = "", searchEvent: (String) -> Unit) {
|
|||||||
input = it
|
input = it
|
||||||
},
|
},
|
||||||
singleLine = true,
|
singleLine = true,
|
||||||
textStyle = TextStyle(fontSize = 20.sp),
|
textStyle = TextStyle(fontSize = 20.sp, color = MaterialTheme.colorScheme.onSurfaceVariant),
|
||||||
keyboardOptions = KeyboardOptions(imeAction = ImeAction.Search),
|
keyboardOptions = KeyboardOptions(imeAction = ImeAction.Search),
|
||||||
keyboardActions = KeyboardActions {
|
keyboardActions = KeyboardActions {
|
||||||
keyboardController?.hide()
|
keyboardController?.hide()
|
||||||
|
|||||||
Reference in New Issue
Block a user