Updated on 2026-08-14
This commit is contained in:
parent
bccd93464f
commit
4354a1f64d
2 changed files with 15 additions and 2 deletions
|
|
@ -26,8 +26,8 @@ import androidx.compose.ui.tooling.preview.Preview
|
|||
import androidx.compose.ui.unit.Dp
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.tangem.core.ui.R
|
||||
import com.tangem.core.ui.res.TangemThemePreview
|
||||
import com.tangem.core.ui.res.TangemTheme
|
||||
import com.tangem.core.ui.res.TangemThemePreview
|
||||
|
||||
/**
|
||||
* [Show in Figma](https://www.figma.com/file/14ISV23YB1yVW1uNVwqrKv/Android?node-id=213%3A218&t=TmfD6UBHPg9uYfev-4)
|
||||
|
|
@ -392,7 +392,11 @@ data class TangemTextFieldColors(
|
|||
else -> unfocusedIndicatorColor
|
||||
}
|
||||
return if (enabled) {
|
||||
animateColorAsState(targetValue, tween(durationMillis = 120))
|
||||
animateColorAsState(
|
||||
targetValue = targetValue,
|
||||
animationSpec = tween(durationMillis = 120),
|
||||
label = "IndicatorColor",
|
||||
)
|
||||
} else {
|
||||
rememberUpdatedState(targetValue)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
package com.tangem.core.ui.res
|
||||
|
||||
import androidx.compose.foundation.text.selection.LocalTextSelectionColors
|
||||
import androidx.compose.foundation.text.selection.TextSelectionColors
|
||||
import androidx.compose.material.Colors
|
||||
import androidx.compose.material.MaterialTheme
|
||||
import androidx.compose.material.ProvideTextStyle
|
||||
|
|
@ -50,6 +52,7 @@ fun TangemTheme(
|
|||
LocalHapticManager provides hapticManager,
|
||||
LocalSnackbarHostState provides snackbarHostState,
|
||||
LocalWindowSize provides windowSize,
|
||||
LocalTextSelectionColors provides TangemTextSelectionColors,
|
||||
) {
|
||||
CompositionLocalProvider(
|
||||
LocalTangemShimmer provides TangemShimmer,
|
||||
|
|
@ -205,6 +208,12 @@ private fun darkThemeColors(): TangemColors {
|
|||
)
|
||||
}
|
||||
|
||||
@Stable
|
||||
private val TangemTextSelectionColors = TextSelectionColors(
|
||||
handleColor = TangemColorPalette.Azure,
|
||||
backgroundColor = TangemColorPalette.Azure.copy(alpha = 0.4f),
|
||||
)
|
||||
|
||||
private val LocalTangemColors = staticCompositionLocalOf<TangemColors> {
|
||||
error("No TangemColors provided")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue