diff --git a/catalog/src/main/kotlin/com/adevinta/spark/catalog/configurator/samples/textfields/TextFieldsConfigurator.kt b/catalog/src/main/kotlin/com/adevinta/spark/catalog/configurator/samples/textfields/TextFieldsConfigurator.kt index c40b8afc7..b767b353a 100644 --- a/catalog/src/main/kotlin/com/adevinta/spark/catalog/configurator/samples/textfields/TextFieldsConfigurator.kt +++ b/catalog/src/main/kotlin/com/adevinta/spark/catalog/configurator/samples/textfields/TextFieldsConfigurator.kt @@ -101,8 +101,8 @@ private fun TextFieldSample() { label = labelText, placeholder = placeHolderText, helper = helperText, - leadingContent = addonText?.let { { Text(it) } }, - trailingContent = icon?.let { { Icon(it, contentDescription = null) } }, + leadingContent = addonText?.let { { Text(it) } } ?: {}, + trailingContent = icon?.let { { Icon(it, contentDescription = null) } } ?: {}, state = state, stateMessage = stateMessageText, ) diff --git a/catalog/src/main/kotlin/com/adevinta/spark/catalog/themes/ThemePicker.kt b/catalog/src/main/kotlin/com/adevinta/spark/catalog/themes/ThemePicker.kt index 9d548871c..1ad8da80f 100644 --- a/catalog/src/main/kotlin/com/adevinta/spark/catalog/themes/ThemePicker.kt +++ b/catalog/src/main/kotlin/com/adevinta/spark/catalog/themes/ThemePicker.kt @@ -142,7 +142,11 @@ public fun ThemePicker( text = { Text(text = brand.name) }, - trailingIcon = if (brand == theme.brandMode) selectedIcon else null, + trailingIcon = if (brand == theme.brandMode) { + selectedIcon + } else { + {} + }, onClick = { onThemeChange(theme.copy(brandMode = brand)) expanded = false diff --git a/spark/src/main/kotlin/com/adevinta/spark/components/menu/DropdownMenu.kt b/spark/src/main/kotlin/com/adevinta/spark/components/menu/DropdownMenu.kt index 63f5b0a79..8e7deb455 100644 --- a/spark/src/main/kotlin/com/adevinta/spark/components/menu/DropdownMenu.kt +++ b/spark/src/main/kotlin/com/adevinta/spark/components/menu/DropdownMenu.kt @@ -145,8 +145,8 @@ public fun DropdownMenuItem( text: @Composable () -> Unit, onClick: () -> Unit, modifier: Modifier = Modifier, - leadingIcon: @Composable (() -> Unit)? = null, - trailingIcon: @Composable (() -> Unit)? = null, + leadingIcon: @Composable (() -> Unit) = {}, + trailingIcon: @Composable (() -> Unit) = {}, enabled: Boolean = true, colors: MenuItemColors = MenuDefaults.itemColors(), contentPadding: PaddingValues = MenuDefaults.DropdownMenuItemContentPadding,