Updated on 2026-08-14

This commit is contained in:
Tangem 2024-10-04 15:46:58 +04:00
parent 5b60d94e60
commit 01e6e50bcb
14 changed files with 131 additions and 82 deletions

View file

@ -71,7 +71,7 @@ fun Notification(
title = config.title,
subtitle = config.subtitle,
subtitleColor = subtitleColor,
isClickableComponent = isEnabled && config.onClick != null,
showArrowIcon = isEnabled && config.showArrowIcon,
)
}
}
@ -130,7 +130,7 @@ private fun MainContent(
title: TextReference?,
subtitle: TextReference,
subtitleColor: Color,
isClickableComponent: Boolean,
showArrowIcon: Boolean,
) {
Row(verticalAlignment = Alignment.CenterVertically) {
Icon(
@ -145,7 +145,7 @@ private fun MainContent(
TextsBlock(title = title, subtitle = subtitle, subtitleColor = subtitleColor)
if (isClickableComponent) {
if (showArrowIcon) {
SpacerWMax()
Icon(

View file

@ -24,6 +24,7 @@ data class NotificationConfig(
val buttonsState: ButtonsState? = null,
val onClick: (() -> Unit)? = null,
val onCloseClick: (() -> Unit)? = null,
val showArrowIcon: Boolean = onClick != null,
) {
sealed class ButtonsState {