supportingContent should be null if there is nothing to display.
This commit is contained in:
parent
ae9d19bc80
commit
b32cebf2c0
1 changed files with 4 additions and 2 deletions
|
|
@ -61,14 +61,16 @@ fun PreferenceCheckbox(
|
||||||
color = enabled.toEnabledColor(),
|
color = enabled.toEnabledColor(),
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
supportingContent = {
|
supportingContent = if (supportingText != null) {
|
||||||
if (supportingText != null) {
|
{
|
||||||
Text(
|
Text(
|
||||||
style = ElementTheme.typography.fontBodyMdRegular,
|
style = ElementTheme.typography.fontBodyMdRegular,
|
||||||
text = supportingText,
|
text = supportingText,
|
||||||
color = enabled.toSecondaryEnabledColor(),
|
color = enabled.toSecondaryEnabledColor(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
null
|
||||||
},
|
},
|
||||||
trailingContent = ListItemContent.Checkbox(
|
trailingContent = ListItemContent.Checkbox(
|
||||||
checked = isChecked,
|
checked = isChecked,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue