feat: SettingsIcon composable
will be useful later Signed-off-by: Infi <infi@infi.sh>
This commit is contained in:
parent
1b63b04fde
commit
a8065151af
|
|
@ -388,3 +388,14 @@ fun SettingsScreen(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
private fun SettingsIcon(danger: Boolean = false, content: @Composable () -> Unit) {
|
||||||
|
CompositionLocalProvider(
|
||||||
|
LocalContentColor provides
|
||||||
|
if (danger) MaterialTheme.colorScheme.error
|
||||||
|
else MaterialTheme.colorScheme.onBackground
|
||||||
|
) {
|
||||||
|
content()
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue