Make text parts in bold.
This commit is contained in:
parent
8f2aecd42b
commit
5a6859b251
3 changed files with 34 additions and 10 deletions
|
|
@ -17,6 +17,7 @@ import androidx.compose.runtime.Composable
|
|||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.graphics.vector.ImageVector
|
||||
import androidx.compose.ui.text.AnnotatedString
|
||||
import androidx.compose.ui.text.TextStyle
|
||||
import androidx.compose.ui.unit.Dp
|
||||
import androidx.compose.ui.unit.dp
|
||||
|
|
@ -54,11 +55,19 @@ fun InfoListOrganism(
|
|||
}
|
||||
InfoListItemMolecule(
|
||||
message = {
|
||||
Text(
|
||||
text = item.message,
|
||||
style = textStyle,
|
||||
color = textColor,
|
||||
)
|
||||
if (item.message is AnnotatedString) {
|
||||
Text(
|
||||
text = item.message,
|
||||
style = textStyle,
|
||||
color = textColor,
|
||||
)
|
||||
} else {
|
||||
Text(
|
||||
text = item.message.toString(),
|
||||
style = textStyle,
|
||||
color = textColor,
|
||||
)
|
||||
}
|
||||
},
|
||||
icon = {
|
||||
if (item.iconId != null) {
|
||||
|
|
@ -87,7 +96,7 @@ fun InfoListOrganism(
|
|||
}
|
||||
|
||||
data class InfoListItem(
|
||||
val message: String,
|
||||
val message: CharSequence,
|
||||
@DrawableRes val iconId: Int? = null,
|
||||
val iconVector: ImageVector? = null,
|
||||
val iconComposable: @Composable () -> Unit = {},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue