Skip to content

Commit

Permalink
ChatInput 页面适配深色模式
Browse files Browse the repository at this point in the history
Former-commit-id: a6d3651
  • Loading branch information
FunnySaltyFish committed Dec 19, 2023
1 parent d5eb825 commit 92c8567
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import androidx.compose.material.icons.filled.CleaningServices
import androidx.compose.material.icons.filled.Clear
import androidx.compose.material.icons.filled.Send
import androidx.compose.material3.IconButton
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.material3.TextField
import androidx.compose.material3.TextFieldDefaults
Expand All @@ -37,15 +38,16 @@ fun ChatInputTextField(
sendAction: () -> Unit,
clearAction: () -> Unit,
) {
val color = MaterialTheme.colorScheme.surface
TextField(
value = input,
onValueChange = onValueChange,
modifier = modifier,
placeholder = { Text(stringResource(id = R.string.chat_input_hint)) },
colors = TextFieldDefaults.colors(
focusedContainerColor = Color.White,
unfocusedContainerColor = Color.White,
disabledContainerColor = Color.White,
focusedContainerColor = color,
unfocusedContainerColor = color,
disabledContainerColor = color,
focusedIndicatorColor = Color.Transparent,
unfocusedIndicatorColor = Color.Transparent,
),
Expand Down

0 comments on commit 92c8567

Please sign in to comment.