Updated on 2026-08-14
This commit is contained in:
commit
cefd2a26b5
7 changed files with 119 additions and 37 deletions
|
|
@ -25,15 +25,8 @@ import com.tangem.core.ui.res.TangemThemePreview
|
|||
* */
|
||||
@Composable
|
||||
fun ChainRow(model: ChainRowUM, modifier: Modifier = Modifier, action: @Composable BoxScope.() -> Unit = {}) {
|
||||
RowContentContainer(
|
||||
modifier = modifier
|
||||
.heightIn(min = TangemTheme.dimens.size68)
|
||||
.padding(vertical = TangemTheme.dimens.spacing8)
|
||||
.padding(
|
||||
start = TangemTheme.dimens.spacing8,
|
||||
end = TangemTheme.dimens.spacing12,
|
||||
),
|
||||
horizontalArrangement = Arrangement.spacedBy(TangemTheme.dimens.spacing12),
|
||||
ChainRowContainer(
|
||||
modifier = modifier,
|
||||
icon = {
|
||||
CurrencyIcon(
|
||||
state = model.icon,
|
||||
|
|
@ -57,6 +50,28 @@ fun ChainRow(model: ChainRowUM, modifier: Modifier = Modifier, action: @Composab
|
|||
)
|
||||
}
|
||||
|
||||
@Composable
|
||||
inline fun ChainRowContainer(
|
||||
icon: @Composable BoxScope.() -> Unit,
|
||||
text: @Composable BoxScope.() -> Unit,
|
||||
action: @Composable BoxScope.() -> Unit,
|
||||
modifier: Modifier = Modifier,
|
||||
) {
|
||||
RowContentContainer(
|
||||
modifier = modifier
|
||||
.heightIn(min = TangemTheme.dimens.size68)
|
||||
.padding(vertical = TangemTheme.dimens.spacing8)
|
||||
.padding(
|
||||
start = TangemTheme.dimens.spacing8,
|
||||
end = TangemTheme.dimens.spacing12,
|
||||
),
|
||||
horizontalArrangement = Arrangement.spacedBy(TangemTheme.dimens.spacing12),
|
||||
icon = icon,
|
||||
text = text,
|
||||
action = action,
|
||||
)
|
||||
}
|
||||
|
||||
// region Preview
|
||||
@Preview(showBackground = true, widthDp = 360)
|
||||
@Preview(showBackground = true, widthDp = 360, uiMode = Configuration.UI_MODE_NIGHT_YES)
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import com.tangem.core.ui.extensions.resolveReference
|
|||
import com.tangem.core.ui.res.TangemTheme
|
||||
|
||||
@Composable
|
||||
internal inline fun RowContentContainer(
|
||||
inline fun RowContentContainer(
|
||||
icon: @Composable BoxScope.() -> Unit,
|
||||
text: @Composable BoxScope.() -> Unit,
|
||||
action: @Composable BoxScope.() -> Unit,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue