Updated on 2026-08-14

This commit is contained in:
Tangem 2025-06-19 16:37:57 +05:00
parent 664305703e
commit 3b6629f7f4
7 changed files with 71 additions and 15 deletions

View file

@ -57,7 +57,11 @@ fun Notification(
titleColor: Color = TangemTheme.colors.text.primary1,
subtitleColor: Color = TangemTheme.colors.text.tertiary,
containerColor: Color? = null,
iconTint: Color? = null,
iconTint: Color? = when (config.iconTint) {
NotificationConfig.IconTint.Unspecified -> null
NotificationConfig.IconTint.Accent -> TangemTheme.colors.icon.accent
NotificationConfig.IconTint.Attention -> TangemTheme.colors.icon.attention
},
iconSize: Dp = 20.dp,
isEnabled: Boolean = true,
) {

View file

@ -25,6 +25,7 @@ data class NotificationConfig(
val onClick: (() -> Unit)? = null,
val onCloseClick: (() -> Unit)? = null,
val showArrowIcon: Boolean = onClick != null,
val iconTint: IconTint = IconTint.Unspecified,
) {
sealed class ButtonsState {
@ -56,4 +57,10 @@ data class NotificationConfig(
val onRightClick: () -> Unit,
) : ButtonsState()
}
enum class IconTint {
Unspecified,
Accent,
Attention,
}
}