Updated on 2026-08-14
This commit is contained in:
parent
fcf3237c59
commit
7f9575b9c9
2 changed files with 15 additions and 0 deletions
12
app/src/main/java/com/tangem/tap/common/compose/Log.kt
Normal file
12
app/src/main/java/com/tangem/tap/common/compose/Log.kt
Normal 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")
|
||||
}
|
||||
|
|
@ -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) }
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue