Updated on 2026-08-14
This commit is contained in:
commit
b76e1bbc45
219 changed files with 4585 additions and 5271 deletions
|
|
@ -102,7 +102,7 @@ fun ClickableWarningCard(
|
|||
* >Figma component</a>
|
||||
*/
|
||||
@Composable
|
||||
fun RefreshableWaringCard(
|
||||
fun RefreshableWarningCard(
|
||||
title: String,
|
||||
description: String,
|
||||
icon: @Composable (() -> Unit)? = null,
|
||||
|
|
@ -193,7 +193,7 @@ private fun WarningsPreview() {
|
|||
onClick = {},
|
||||
)
|
||||
SpacerH32()
|
||||
RefreshableWaringCard(
|
||||
RefreshableWarningCard(
|
||||
title = "Exchange rate has expired",
|
||||
description = "To access all the networks, you need to scan the card.",
|
||||
onClick = {},
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ import androidx.compose.ui.graphics.Color
|
|||
import androidx.compose.ui.text.TextStyle
|
||||
import androidx.compose.ui.text.input.KeyboardType
|
||||
import androidx.compose.ui.text.style.TextAlign
|
||||
import androidx.compose.ui.text.style.TextDirection
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.compose.ui.tooling.preview.PreviewParameter
|
||||
import androidx.compose.ui.tooling.preview.PreviewParameterProvider
|
||||
|
|
@ -74,7 +75,7 @@ fun AmountTextField(
|
|||
},
|
||||
modifier = modifier
|
||||
.background(TangemTheme.colors.background.action),
|
||||
textStyle = textStyle,
|
||||
textStyle = textStyle.copy(textDirection = TextDirection.ContentOrLtr),
|
||||
color = color,
|
||||
keyboardOptions = keyboardOptions,
|
||||
keyboardActions = keyboardActions,
|
||||
|
|
@ -90,7 +91,7 @@ fun AmountTextField(
|
|||
}
|
||||
Text(
|
||||
text = placeholder,
|
||||
style = textStyle,
|
||||
style = textStyle.copy(textDirection = TextDirection.ContentOrLtr),
|
||||
color = TangemTheme.colors.text.disabled,
|
||||
textAlign = placeholderTextAlign,
|
||||
modifier = Modifier
|
||||
|
|
|
|||
|
|
@ -67,9 +67,7 @@ fun SimpleTextField(
|
|||
|
||||
LaunchedEffect(key1 = isSelectionChanged) {
|
||||
if (isSelectionChanged) {
|
||||
textFieldValueState = textFieldValue.copy(
|
||||
selection = getValueRange(value),
|
||||
)
|
||||
textFieldValueState = textFieldValue
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,12 @@ import com.tangem.core.ui.utils.DEFAULT_ANIMATION_DURATION
|
|||
fun PasteButton(isPasteButtonVisible: Boolean, onClick: (String) -> Unit, modifier: Modifier = Modifier) {
|
||||
val clipboardManager = LocalClipboardManager.current
|
||||
val hapticFeedback = LocalHapticFeedback.current
|
||||
|
||||
val isPasteEnabled = !clipboardManager.getText()?.text.isNullOrEmpty()
|
||||
val color = if (isPasteEnabled) {
|
||||
TangemTheme.colors.button.primary
|
||||
} else {
|
||||
TangemTheme.colors.button.secondary
|
||||
}
|
||||
AnimatedVisibility(
|
||||
visible = isPasteButtonVisible,
|
||||
label = "Paste Button Visibility Animation",
|
||||
|
|
@ -50,7 +55,7 @@ fun PasteButton(isPasteButtonVisible: Boolean, onClick: (String) -> Unit, modifi
|
|||
color = TangemTheme.colors.text.primary2,
|
||||
modifier = Modifier
|
||||
.background(
|
||||
color = TangemTheme.colors.button.primary,
|
||||
color = color,
|
||||
shape = TangemTheme.shapes.roundedCornersXMedium,
|
||||
)
|
||||
.padding(
|
||||
|
|
@ -60,6 +65,7 @@ fun PasteButton(isPasteButtonVisible: Boolean, onClick: (String) -> Unit, modifi
|
|||
.clickable(
|
||||
interactionSource = remember { MutableInteractionSource() },
|
||||
indication = rememberRipple(radius = TangemTheme.dimens.radius8),
|
||||
enabled = isPasteEnabled,
|
||||
onClick = {
|
||||
hapticFeedback.performHapticFeedback(HapticFeedbackType.LongPress)
|
||||
onClick(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue