Updated on 2026-08-14

This commit is contained in:
Tangem 2022-04-07 13:02:03 +03:00
parent fcf3237c59
commit 7f9575b9c9
2 changed files with 15 additions and 0 deletions

View file

@ -0,0 +1,12 @@
package com.tangem.tap.common.compose
import androidx.compose.runtime.Composable
import timber.log.Timber
/**
* Simple logger for all recompositions
*/
@Composable
fun LogSideEffect(message: String) {
Timber.w("SideEffect: $message")
}

View file

@ -11,6 +11,7 @@ import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.input.VisualTransformation
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
@ -34,6 +35,7 @@ fun OutlinedTextFieldWidget(
error: DomainError? = null,
errorConverter: ErrorConverter<String>? = null,
debounceTextChanges: Long = 400,
visualTransformation: VisualTransformation = VisualTransformation.None,
onTextChanged: (String) -> Unit,
) {
val placeholder = placeholderId?.let { stringResource(id = it) } ?: placeholder
@ -57,6 +59,7 @@ fun OutlinedTextFieldWidget(
singleLine = true,
enabled = isEnabled,
isError = error != null,
visualTransformation = visualTransformation,
)
errorConverter?.let { TextFieldErrorWidget(error, it) }
}