🛠️ Fix search field taking the whole screen height

* Fixed bug where search field took all the height of the screen
This commit is contained in:
Acclorite 2024-11-12 09:16:43 +02:00
parent c40b068e11
commit 902b976bbe

View file

@ -1,7 +1,6 @@
package ua.acclorite.book_story.presentation.core.components.common
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.text.BasicTextField
import androidx.compose.foundation.text.KeyboardActions
import androidx.compose.foundation.text.KeyboardOptions
@ -60,10 +59,7 @@ fun SearchTextField(
),
cursorBrush = SolidColor(MaterialTheme.colorScheme.onSurfaceVariant)
) { innerText ->
Box(
modifier = Modifier.fillMaxHeight(),
contentAlignment = Alignment.CenterStart
) {
Box(contentAlignment = Alignment.CenterStart) {
if (query.isEmpty()) {
Text(
text = stringResource(id = R.string.search_field_empty),