From 0242514194694957b15fc03726e2360bcb618715 Mon Sep 17 00:00:00 2001 From: Kevin Boulongne Date: Tue, 5 Nov 2024 11:38:26 +0100 Subject: [PATCH] feat: Add missing `SettingDivider` preview --- .../main/settings/components/OptionScaffold.kt | 2 +- .../main/settings/components/SettingDivider.kt | 13 +++++++++++++ .../screen/main/settings/components/SettingItem.kt | 2 +- .../main/settings/components/SingleSelectOptions.kt | 2 +- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/components/OptionScaffold.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/components/OptionScaffold.kt index e52028d135..b97184386f 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/components/OptionScaffold.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/components/OptionScaffold.kt @@ -70,7 +70,7 @@ fun OptionScaffold( @PreviewAllWindows @Composable -private fun OptionScaffoldPreview() { +private fun Preview() { SwissTransferTheme { OptionScaffold( topAppBarTitleRes = R.string.settingsOptionTheme, diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/components/SettingDivider.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/components/SettingDivider.kt index 7807ad70d1..4131fc0249 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/components/SettingDivider.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/components/SettingDivider.kt @@ -19,9 +19,12 @@ package com.infomaniak.swisstransfer.ui.screen.main.settings.components import androidx.compose.foundation.layout.padding import androidx.compose.material3.HorizontalDivider +import androidx.compose.material3.Surface import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import com.infomaniak.swisstransfer.ui.theme.Dimens +import com.infomaniak.swisstransfer.ui.theme.SwissTransferTheme +import com.infomaniak.swisstransfer.ui.utils.PreviewLightAndDark @Composable fun SettingDivider() { @@ -32,3 +35,13 @@ fun SettingDivider() { ), ) } + +@PreviewLightAndDark +@Composable +private fun Preview() { + SwissTransferTheme { + Surface { + SettingDivider() + } + } +} diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/components/SettingItem.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/components/SettingItem.kt index 90363630aa..4f651fb5a6 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/components/SettingItem.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/components/SettingItem.kt @@ -117,7 +117,7 @@ private fun SettingItemContent( @PreviewLightAndDark @Composable -private fun SettingItemPreview() { +private fun Preview() { SwissTransferTheme { Surface { Column(modifier = Modifier.selectableGroup()) { diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/components/SingleSelectOptions.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/components/SingleSelectOptions.kt index 02ccc85596..9ca7e8ac32 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/components/SingleSelectOptions.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/components/SingleSelectOptions.kt @@ -102,7 +102,7 @@ interface SettingOption { @PreviewLightAndDark @Composable -private fun SettingOptionItemPreview() { +private fun Preview() { SwissTransferTheme { Surface { Column {