Updated on 2026-08-14

This commit is contained in:
Tangem 2024-02-05 21:00:06 +03:00
parent 946d60c1c6
commit 9c11182ca6
14 changed files with 127 additions and 40 deletions

View file

@ -1,5 +1,6 @@
package com.tangem.core.ui.components.fields
import androidx.compose.animation.AnimatedContent
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.text.BasicTextField
import androidx.compose.foundation.text.KeyboardOptions
@ -89,11 +90,16 @@ fun SimpleTextField(
decorationBox = decorationBox ?: { textValue ->
Box {
if (value.isBlank() && placeholder != null) {
Text(
text = placeholder.resolveReference(),
style = textStyle,
color = TangemTheme.colors.text.disabled,
)
AnimatedContent(
targetState = placeholder,
label = "Placeholder Change Animation",
) {
Text(
text = it.resolveReference(),
style = textStyle,
color = TangemTheme.colors.text.disabled,
)
}
}
textValue()
}