From 66946d2193c08673857b064ac4c5a59272049db9 Mon Sep 17 00:00:00 2001 From: Vincent TE Date: Wed, 23 Oct 2024 15:47:46 +0200 Subject: [PATCH] Add Preview in Light and Dark mode --- .../swisstransfer/ui/screen/newtransfer/FilesSize.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/FilesSize.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/FilesSize.kt index 9d593e829..468169212 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/FilesSize.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/FilesSize.kt @@ -17,6 +17,7 @@ */ package com.infomaniak.swisstransfer.ui.screen.newtransfer +import android.content.res.Configuration import androidx.compose.foundation.layout.* import androidx.compose.material3.Surface import androidx.compose.material3.Text @@ -78,7 +79,11 @@ fun FilesSize(files: List, withSpaceLeft: Boolean) { } } -@Preview +@Preview(name = "Light") +@Preview( + name = "Dark", + uiMode = Configuration.UI_MODE_NIGHT_YES or Configuration.UI_MODE_TYPE_NORMAL, +) @Composable fun FileSizePreview(@PreviewParameter(FileUiListPreviewParameter::class) files: List) { SwissTransferTheme {