mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-17 23:47:02 +05:30
TodoTheme: use default colors but with system theme awareness
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
parent
bfd060e66e
commit
3ed1cdb261
1 changed files with 4 additions and 0 deletions
|
@ -1,11 +1,15 @@
|
|||
package dev.msfjarvis.todo.ui
|
||||
|
||||
import androidx.compose.foundation.isSystemInDarkTheme
|
||||
import androidx.compose.material.MaterialTheme
|
||||
import androidx.compose.material.darkColors
|
||||
import androidx.compose.material.lightColors
|
||||
import androidx.compose.runtime.Composable
|
||||
|
||||
@Composable
|
||||
fun TodoTheme(children: @Composable () -> Unit) {
|
||||
MaterialTheme(
|
||||
colors = if (isSystemInDarkTheme()) darkColors() else lightColors(),
|
||||
content = children,
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue