feat(CON-287) : Mettre en place le dark theme.
This commit is contained in:
parent
ed2d0ddb43
commit
76d021d35d
@ -16,20 +16,7 @@ import fr.openium.consentium.R
|
||||
import fr.openium.consentium.api.Consentium
|
||||
import fr.openium.consentium.ui.screens.main.MainScreen
|
||||
import fr.openium.consentium.ui.screens.splash.SplashScreen
|
||||
import fr.openium.consentium.ui.theme.Error
|
||||
import fr.openium.consentium.ui.theme.OnPrimary
|
||||
import fr.openium.consentium.ui.theme.OnSecondary
|
||||
import fr.openium.consentium.ui.theme.OnSurface
|
||||
import fr.openium.consentium.ui.theme.OnSurfaceVariant
|
||||
import fr.openium.consentium.ui.theme.Primary
|
||||
import fr.openium.consentium.ui.theme.Secondary
|
||||
import fr.openium.consentium.ui.theme.Success
|
||||
import fr.openium.consentium.ui.theme.SurfaceHigh
|
||||
import fr.openium.consentium.ui.theme.SurfaceHighest
|
||||
import fr.openium.consentium.ui.theme.SurfaceMiddle
|
||||
import fr.openium.consentium.ui.theme.Tertiary
|
||||
import fr.openium.consentium_ui.ui.components.ConsentiumComponent
|
||||
import fr.openium.consentium_ui.ui.components.style.ConsentiumDefaults
|
||||
import fr.openium.consentium_ui.ui.model.ConsentiumPageUI
|
||||
|
||||
private const val NAV_ANIMATION_TIME = 500
|
||||
@ -159,20 +146,6 @@ fun DemoNavGraph(navHostController: NavHostController) {
|
||||
context = context,
|
||||
apiKey = apiKey,
|
||||
appId = appId,
|
||||
),
|
||||
colors = ConsentiumDefaults.colors(
|
||||
primary = Primary,
|
||||
onPrimary = OnPrimary,
|
||||
secondary = Secondary,
|
||||
onSecondary = OnSecondary,
|
||||
tertiary = Tertiary,
|
||||
onSurfaceVariant = OnSurfaceVariant,
|
||||
onSurface = OnSurface,
|
||||
error = Error,
|
||||
surfaceHighest = SurfaceHighest,
|
||||
surfaceHigh = SurfaceHigh,
|
||||
surfaceMiddle = SurfaceMiddle,
|
||||
success = Success,
|
||||
)
|
||||
)
|
||||
}
|
||||
|
@ -18,7 +18,6 @@ fun MainScreen(
|
||||
onGoToConsentDetail: () -> Unit,
|
||||
modifier: Modifier = Modifier,
|
||||
) {
|
||||
|
||||
// View
|
||||
Column(
|
||||
modifier = modifier.fillMaxSize(),
|
||||
|
@ -8,14 +8,38 @@ import androidx.compose.runtime.Composable
|
||||
|
||||
private val DarkColorScheme = darkColorScheme(
|
||||
primary = Primary,
|
||||
onPrimary = OnPrimary,
|
||||
|
||||
secondary = Secondary,
|
||||
tertiary = Tertiary
|
||||
onSecondary = OnSecondary,
|
||||
|
||||
tertiary = Tertiary,
|
||||
|
||||
onSurfaceVariant = OnSurfaceVariant,
|
||||
onSurface = OnSurface,
|
||||
|
||||
error = Error,
|
||||
surfaceContainerHighest = SurfaceHighest,
|
||||
surfaceContainerHigh = SurfaceHigh,
|
||||
surfaceContainer = SurfaceMiddle,
|
||||
)
|
||||
|
||||
private val LightColorScheme = lightColorScheme(
|
||||
primary = Primary,
|
||||
onPrimary = OnPrimary,
|
||||
|
||||
secondary = Secondary,
|
||||
tertiary = Tertiary
|
||||
onSecondary = OnSecondary,
|
||||
|
||||
tertiary = Tertiary,
|
||||
|
||||
onSurfaceVariant = OnSurfaceVariant,
|
||||
onSurface = OnSurface,
|
||||
|
||||
error = Error,
|
||||
surfaceContainerHighest = SurfaceHighest,
|
||||
surfaceContainerHigh = SurfaceHigh,
|
||||
surfaceContainer = SurfaceMiddle,
|
||||
)
|
||||
|
||||
@Composable
|
||||
|
@ -92,7 +92,7 @@ object ConsentiumDefaults {
|
||||
fun colors(
|
||||
primary: Color = MaterialTheme.colorScheme.primary,
|
||||
onPrimary: Color = MaterialTheme.colorScheme.onPrimary,
|
||||
secondary: Color = MaterialTheme.colorScheme.background,
|
||||
secondary: Color = MaterialTheme.colorScheme.secondary,
|
||||
onSecondary: Color = MaterialTheme.colorScheme.surfaceVariant,
|
||||
tertiary: Color = MaterialTheme.colorScheme.onBackground,
|
||||
onSurfaceVariant: Color = MaterialTheme.colorScheme.onBackground,
|
||||
|
Loading…
x
Reference in New Issue
Block a user