Updated on 2026-08-14
This commit is contained in:
parent
3d5f04adf2
commit
9bdfaf096e
2 changed files with 7 additions and 2 deletions
|
|
@ -38,6 +38,7 @@ fun SimpleTextField(
|
|||
keyboardActions: KeyboardActions = KeyboardActions.Default,
|
||||
color: Color = TangemTheme.colors.text.primary1,
|
||||
textStyle: TextStyle = TangemTheme.typography.body2.copy(color = color),
|
||||
placeholderColor: Color = TangemTheme.colors.text.disabled,
|
||||
readOnly: Boolean = false,
|
||||
isValuePasted: Boolean = false,
|
||||
onValuePastedTriggerDismiss: () -> Unit = {},
|
||||
|
|
@ -108,6 +109,7 @@ fun SimpleTextField(
|
|||
value = value,
|
||||
textStyle = textStyle,
|
||||
textValue = textValue,
|
||||
color = placeholderColor,
|
||||
)
|
||||
},
|
||||
modifier = modifier
|
||||
|
|
@ -122,6 +124,7 @@ private fun SimpleTextPlaceholder(
|
|||
value: String,
|
||||
textStyle: TextStyle,
|
||||
textValue: @Composable () -> Unit,
|
||||
color: Color = TangemTheme.colors.text.disabled,
|
||||
) {
|
||||
Box {
|
||||
if (value.isBlank() && placeholder != null) {
|
||||
|
|
@ -132,7 +135,7 @@ private fun SimpleTextPlaceholder(
|
|||
Text(
|
||||
text = it.resolveReference(),
|
||||
style = textStyle,
|
||||
color = TangemTheme.colors.text.disabled,
|
||||
color = color,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,9 +33,10 @@ internal fun TextFieldWithPaste(
|
|||
) {
|
||||
val (title, color) = when {
|
||||
isError && error != null -> error to TangemTheme.colors.text.warning
|
||||
isReadOnly -> label to TangemTheme.colors.text.disabled
|
||||
isReadOnly -> label to TangemTheme.colors.text.tertiary
|
||||
else -> label to TangemTheme.colors.text.secondary
|
||||
}
|
||||
val placeholderColor = if (isReadOnly) TangemTheme.colors.text.tertiary else TangemTheme.colors.text.disabled
|
||||
FooterContainer(modifier, footer) {
|
||||
Box(
|
||||
modifier = Modifier
|
||||
|
|
@ -59,6 +60,7 @@ internal fun TextFieldWithPaste(
|
|||
SimpleTextField(
|
||||
value = value,
|
||||
placeholder = placeholder,
|
||||
placeholderColor = placeholderColor,
|
||||
onValueChange = onValueChange,
|
||||
readOnly = isReadOnly,
|
||||
modifier = Modifier
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue