Use theming in debug screen.
parent
76a8706e1f
commit
2b53df2ed4
@ -0,0 +1,30 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
package org.mozilla.fenix.theme
|
||||
|
||||
import androidx.compose.foundation.isSystemInDarkTheme
|
||||
import androidx.compose.material.MaterialTheme
|
||||
import androidx.compose.material.Colors
|
||||
import androidx.compose.material.darkColors
|
||||
import androidx.compose.material.lightColors
|
||||
import androidx.compose.runtime.Composable
|
||||
|
||||
/**
|
||||
* The theme for Mozilla Firefox for Android (Fenix).
|
||||
*/
|
||||
@Composable
|
||||
fun FirefoxTheme(
|
||||
darkTheme: Boolean = isSystemInDarkTheme(),
|
||||
content: @Composable () -> Unit
|
||||
) {
|
||||
MaterialTheme(
|
||||
content = content,
|
||||
colors = if (darkTheme) darkColorPalette else lightColorPalette
|
||||
)
|
||||
}
|
||||
|
||||
private val darkColorPalette: Colors = darkColors()
|
||||
|
||||
private val lightColorPalette: Colors = lightColors()
|
Loading…
Reference in New Issue