Updated on 2026-08-14
This commit is contained in:
parent
2cf60002a4
commit
a7f5b54078
17 changed files with 319 additions and 336 deletions
|
|
@ -1,7 +1,9 @@
|
|||
package com.tangem.core.ui.components.inputrow
|
||||
|
||||
import android.content.res.Configuration
|
||||
import androidx.annotation.DrawableRes
|
||||
import androidx.compose.animation.AnimatedVisibility
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.layout.*
|
||||
import androidx.compose.material3.Icon
|
||||
import androidx.compose.material3.Text
|
||||
|
|
@ -42,11 +44,13 @@ import com.tangem.core.ui.res.TangemThemePreview
|
|||
@Composable
|
||||
internal fun InputRowImageBase(
|
||||
subtitle: TextReference,
|
||||
imageUrl: String?,
|
||||
modifier: Modifier = Modifier,
|
||||
caption: TextReference? = null,
|
||||
imageUrl: String? = null,
|
||||
@DrawableRes iconRes: Int? = null,
|
||||
subtitleColor: Color = TangemTheme.colors.text.primary1,
|
||||
captionColor: Color = TangemTheme.colors.text.tertiary,
|
||||
iconTint: Color = TangemTheme.colors.icon.informative,
|
||||
isGrayscaleImage: Boolean = false,
|
||||
iconEndRes: Int? = null,
|
||||
extraContent: (@Composable RowScope.() -> Unit)? = null,
|
||||
|
|
@ -65,6 +69,23 @@ internal fun InputRowImageBase(
|
|||
)
|
||||
SpacerW12()
|
||||
}
|
||||
if (iconRes != null) {
|
||||
Box(
|
||||
contentAlignment = Alignment.Center,
|
||||
modifier = Modifier
|
||||
.size(TangemTheme.dimens.spacing36)
|
||||
.clip(TangemTheme.shapes.roundedCornersXLarge)
|
||||
.background(iconTint.copy(alpha = 0.08f)),
|
||||
) {
|
||||
Icon(
|
||||
painter = rememberVectorPainter(image = ImageVector.vectorResource(id = iconRes)),
|
||||
tint = iconTint,
|
||||
contentDescription = null,
|
||||
modifier = Modifier.size(TangemTheme.dimens.size18),
|
||||
)
|
||||
}
|
||||
SpacerW12()
|
||||
}
|
||||
Column {
|
||||
Text(
|
||||
text = subtitle.resolveReference(),
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.tangem.core.ui.components.inputrow
|
||||
|
||||
import android.content.res.Configuration
|
||||
import androidx.annotation.DrawableRes
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.padding
|
||||
|
|
@ -40,15 +41,17 @@ import com.tangem.core.ui.res.TangemThemePreview
|
|||
fun InputRowImageInfo(
|
||||
subtitle: TextReference,
|
||||
infoTitle: TextReference,
|
||||
imageUrl: String?,
|
||||
modifier: Modifier = Modifier,
|
||||
title: TextReference? = null,
|
||||
caption: TextReference? = null,
|
||||
infoSubtitle: TextReference? = null,
|
||||
imageUrl: String? = null,
|
||||
@DrawableRes iconRes: Int? = null,
|
||||
subtitleColor: Color = TangemTheme.colors.text.primary1,
|
||||
captionColor: Color = TangemTheme.colors.text.tertiary,
|
||||
iconTint: Color = TangemTheme.colors.icon.informative,
|
||||
isGrayscaleImage: Boolean = false,
|
||||
iconEndRes: Int? = null,
|
||||
@DrawableRes iconEndRes: Int? = null,
|
||||
) {
|
||||
Column(
|
||||
verticalArrangement = Arrangement.spacedBy(TangemTheme.dimens.spacing6),
|
||||
|
|
@ -66,6 +69,8 @@ fun InputRowImageInfo(
|
|||
subtitle = subtitle,
|
||||
caption = caption,
|
||||
imageUrl = imageUrl,
|
||||
iconRes = iconRes,
|
||||
iconTint = iconTint,
|
||||
subtitleColor = subtitleColor,
|
||||
captionColor = captionColor,
|
||||
isGrayscaleImage = isGrayscaleImage,
|
||||
|
|
|
|||
21
core/ui/src/main/res/drawable/ic_connection_18.xml
Normal file
21
core/ui/src/main/res/drawable/ic_connection_18.xml
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:autoMirrored="true" android:height="18dp" android:viewportHeight="18" android:viewportWidth="18" android:width="18dp">
|
||||
|
||||
<group>
|
||||
|
||||
<clip-path android:pathData="M0,0h18v18h-18z"/>
|
||||
|
||||
<path android:fillColor="#00000000" android:pathData="M14.25,3.75L16.5,1.5" android:strokeColor="#0099FF" android:strokeLineJoin="round" android:strokeWidth="1.5"/>
|
||||
|
||||
<path android:fillColor="#00000000" android:pathData="M1.5,16.5L3.75,14.25" android:strokeColor="#0099FF" android:strokeLineJoin="round" android:strokeWidth="1.5"/>
|
||||
|
||||
<path android:fillColor="#00000000" android:pathData="M4.725,15.225C4.892,15.393 5.091,15.526 5.31,15.617C5.529,15.708 5.763,15.754 6,15.754C6.237,15.754 6.472,15.708 6.69,15.617C6.909,15.526 7.108,15.393 7.275,15.225L9,13.5L4.5,9L2.775,10.725C2.607,10.892 2.474,11.091 2.383,11.31C2.292,11.528 2.246,11.763 2.246,12C2.246,12.237 2.292,12.472 2.383,12.69C2.474,12.909 2.607,13.108 2.775,13.275L4.725,15.225Z" android:strokeColor="#0099FF" android:strokeLineCap="round" android:strokeLineJoin="round" android:strokeWidth="1.5"/>
|
||||
|
||||
<path android:fillColor="#00000000" android:pathData="M6,10L8,8" android:strokeColor="#0099FF" android:strokeLineJoin="round" android:strokeWidth="1.5"/>
|
||||
|
||||
<path android:fillColor="#00000000" android:pathData="M8,12L10,10" android:strokeColor="#0099FF" android:strokeLineJoin="round" android:strokeWidth="1.5"/>
|
||||
|
||||
<path android:fillColor="#00000000" android:pathData="M9,4.5L13.5,9L15.225,7.275C15.393,7.107 15.526,6.909 15.617,6.69C15.708,6.471 15.754,6.236 15.754,6C15.754,5.763 15.708,5.528 15.617,5.309C15.526,5.09 15.393,4.892 15.225,4.725L13.275,2.775C13.108,2.607 12.909,2.474 12.69,2.383C12.472,2.292 12.237,2.245 12,2.245C11.763,2.245 11.528,2.292 11.31,2.383C11.091,2.474 10.892,2.607 10.725,2.775L9,4.5Z" android:strokeColor="#0099FF" android:strokeLineCap="round" android:strokeLineJoin="round" android:strokeWidth="1.5"/>
|
||||
|
||||
</group>
|
||||
|
||||
</vector>
|
||||
Loading…
Add table
Add a link
Reference in a new issue