feat: dynamic colour, and android maps dark theme
This commit is contained in:
parent
34923ce743
commit
ea08db364e
5 changed files with 72 additions and 2 deletions
|
|
@ -0,0 +1,23 @@
|
|||
package moe.lava.banksia.native
|
||||
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.darkColorScheme
|
||||
import androidx.compose.material3.lightColorScheme
|
||||
import androidx.compose.runtime.Composable
|
||||
|
||||
@Composable
|
||||
actual fun BanksiaTheme(
|
||||
darkTheme: Boolean,
|
||||
dynamicColor: Boolean,
|
||||
content: @Composable (() -> Unit)
|
||||
) {
|
||||
val colorScheme = when {
|
||||
darkTheme -> darkColorScheme()
|
||||
else -> lightColorScheme()
|
||||
}
|
||||
|
||||
MaterialTheme(
|
||||
colorScheme = colorScheme,
|
||||
content = content
|
||||
)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue