supportingContent should be null if there is nothing to display.
This commit is contained in:
committed by
Benoit Marty
parent
ae9d19bc80
commit
b32cebf2c0
@@ -61,14 +61,16 @@ fun PreferenceCheckbox(
|
||||
color = enabled.toEnabledColor(),
|
||||
)
|
||||
},
|
||||
supportingContent = {
|
||||
if (supportingText != null) {
|
||||
supportingContent = if (supportingText != null) {
|
||||
{
|
||||
Text(
|
||||
style = ElementTheme.typography.fontBodyMdRegular,
|
||||
text = supportingText,
|
||||
color = enabled.toSecondaryEnabledColor(),
|
||||
)
|
||||
}
|
||||
} else {
|
||||
null
|
||||
},
|
||||
trailingContent = ListItemContent.Checkbox(
|
||||
checked = isChecked,
|
||||
|
||||
Reference in New Issue
Block a user