11package to.bitkit.ui.components
22
3- import androidx.compose.animation.AnimatedContent
43import androidx.compose.foundation.Image
54import androidx.compose.foundation.background
65import androidx.compose.foundation.layout.Arrangement
@@ -18,7 +17,6 @@ import androidx.compose.ui.Modifier
1817import androidx.compose.ui.draw.clip
1918import androidx.compose.ui.draw.rotate
2019import androidx.compose.ui.res.painterResource
21- import androidx.compose.ui.res.stringResource
2220import androidx.compose.ui.tooling.preview.Preview
2321import androidx.compose.ui.unit.dp
2422import to.bitkit.R
@@ -34,7 +32,6 @@ fun NotificationPreview(
3432 enabled : Boolean ,
3533 title : String ,
3634 description : String ,
37- showDetails : Boolean ,
3835 modifier : Modifier = Modifier ,
3936 time : String = "5m",
4037) {
@@ -66,13 +63,7 @@ fun NotificationPreview(
6663 Caption (text = time, color = Colors .White64 )
6764 }
6865
69- val bodyText = when (showDetails) {
70- true -> description
71- else -> stringResource(R .string.notification__received__body_hidden)
72- }
73- AnimatedContent (targetState = bodyText) { text ->
74- BodyS (text = text, color = Colors .White80 )
75- }
66+ BodyS (text = description, color = Colors .White80 )
7667 }
7768
7869 Icon (
@@ -110,14 +101,12 @@ private fun Preview() {
110101 enabled = true ,
111102 title = " Payment Received" ,
112103 description = " ₿ 21 000 ($21.00)" ,
113- showDetails = true ,
114104 modifier = Modifier .fillMaxWidth()
115105 )
116106 NotificationPreview (
117107 enabled = false ,
118108 title = " Payment Received" ,
119109 description = " ₿ 21 000 ($21.00)" ,
120- showDetails = false ,
121110 modifier = Modifier .fillMaxWidth()
122111 )
123112 }
0 commit comments