diff --git a/feature/account/oauth/src/debug/kotlin/app/k9mail/feature/account/oauth/ui/AccountOAuthContentPreview.kt b/feature/account/oauth/src/debug/kotlin/app/k9mail/feature/account/oauth/ui/AccountOAuthContentPreview.kt new file mode 100644 index 000000000..b9887ae75 --- /dev/null +++ b/feature/account/oauth/src/debug/kotlin/app/k9mail/feature/account/oauth/ui/AccountOAuthContentPreview.kt @@ -0,0 +1,16 @@ +package app.k9mail.feature.account.oauth.ui + +import androidx.compose.runtime.Composable +import app.k9mail.core.ui.compose.common.annotation.PreviewDevices +import app.k9mail.core.ui.compose.designsystem.PreviewWithTheme + +@Composable +@PreviewDevices +internal fun AccountOAuthContentPreview() { + PreviewWithTheme { + AccountOAuthContent( + state = AccountOAuthContract.State(), + onEvent = {}, + ) + } +} diff --git a/feature/account/oauth/src/debug/kotlin/app/k9mail/feature/account/oauth/ui/view/SignInViewPreview.kt b/feature/account/oauth/src/debug/kotlin/app/k9mail/feature/account/oauth/ui/view/SignInViewPreview.kt new file mode 100644 index 000000000..9fa69194f --- /dev/null +++ b/feature/account/oauth/src/debug/kotlin/app/k9mail/feature/account/oauth/ui/view/SignInViewPreview.kt @@ -0,0 +1,27 @@ +package app.k9mail.feature.account.oauth.ui.view + +import androidx.compose.runtime.Composable +import app.k9mail.core.ui.compose.common.annotation.PreviewDevices +import app.k9mail.core.ui.compose.designsystem.PreviewWithTheme + +@PreviewDevices +@Composable +internal fun SignInViewPreview() { + PreviewWithTheme { + SignInView( + onSignInClick = {}, + isGoogleSignIn = false, + ) + } +} + +@PreviewDevices +@Composable +internal fun SignInViewWithGooglePreview() { + PreviewWithTheme { + SignInView( + onSignInClick = {}, + isGoogleSignIn = true, + ) + } +} diff --git a/feature/account/oauth/src/debug/kotlin/app/k9mail/feature/account/oauth/ui/view/SignInWithGoogleButtonPreview.kt b/feature/account/oauth/src/debug/kotlin/app/k9mail/feature/account/oauth/ui/view/SignInWithGoogleButtonPreview.kt new file mode 100644 index 000000000..4a4bd01a3 --- /dev/null +++ b/feature/account/oauth/src/debug/kotlin/app/k9mail/feature/account/oauth/ui/view/SignInWithGoogleButtonPreview.kt @@ -0,0 +1,26 @@ +package app.k9mail.feature.account.oauth.ui.view + +import androidx.compose.runtime.Composable +import androidx.compose.ui.tooling.preview.Preview +import app.k9mail.core.ui.compose.designsystem.PreviewWithThemes + +@Composable +@Preview(showBackground = true) +internal fun SignInWithGoogleButtonPreview() { + PreviewWithThemes { + SignInWithGoogleButton( + onClick = {}, + ) + } +} + +@Composable +@Preview(showBackground = true) +internal fun SignInWithGoogleButtonDisabledPreview() { + PreviewWithThemes { + SignInWithGoogleButton( + onClick = {}, + enabled = false, + ) + } +} diff --git a/feature/account/oauth/src/main/kotlin/app/k9mail/feature/account/oauth/ui/AccountOAuthContent.kt b/feature/account/oauth/src/main/kotlin/app/k9mail/feature/account/oauth/ui/AccountOAuthContent.kt index 5b72a079a..aa1553f03 100644 --- a/feature/account/oauth/src/main/kotlin/app/k9mail/feature/account/oauth/ui/AccountOAuthContent.kt +++ b/feature/account/oauth/src/main/kotlin/app/k9mail/feature/account/oauth/ui/AccountOAuthContent.kt @@ -8,12 +8,9 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.platform.testTag import androidx.compose.ui.res.stringResource -import app.k9mail.core.ui.compose.common.annotation.PreviewDevices import app.k9mail.core.ui.compose.designsystem.molecule.ErrorView import app.k9mail.core.ui.compose.designsystem.molecule.LoadingView -import app.k9mail.core.ui.compose.theme.K9Theme -import app.k9mail.core.ui.compose.theme.MainTheme -import app.k9mail.core.ui.compose.theme.ThunderbirdTheme +import app.k9mail.core.ui.compose.theme2.MainTheme import app.k9mail.feature.account.oauth.R import app.k9mail.feature.account.oauth.ui.AccountOAuthContract.Event import app.k9mail.feature.account.oauth.ui.AccountOAuthContract.State @@ -53,25 +50,3 @@ internal fun AccountOAuthContent( } } } - -@Composable -@PreviewDevices -internal fun AccountOAuthContentK9Preview() { - K9Theme { - AccountOAuthContent( - state = State(), - onEvent = {}, - ) - } -} - -@Composable -@PreviewDevices -internal fun AccountOAuthContentThunderbirdPreview() { - ThunderbirdTheme { - AccountOAuthContent( - state = State(), - onEvent = {}, - ) - } -} diff --git a/feature/account/oauth/src/main/kotlin/app/k9mail/feature/account/oauth/ui/view/SignInView.kt b/feature/account/oauth/src/main/kotlin/app/k9mail/feature/account/oauth/ui/view/SignInView.kt index 4f8a1b943..f039a5da9 100644 --- a/feature/account/oauth/src/main/kotlin/app/k9mail/feature/account/oauth/ui/view/SignInView.kt +++ b/feature/account/oauth/src/main/kotlin/app/k9mail/feature/account/oauth/ui/view/SignInView.kt @@ -7,10 +7,9 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.style.TextAlign -import app.k9mail.core.ui.compose.common.annotation.PreviewDevices import app.k9mail.core.ui.compose.designsystem.atom.button.ButtonFilled import app.k9mail.core.ui.compose.designsystem.atom.text.TextBodySmall -import app.k9mail.core.ui.compose.theme.MainTheme +import app.k9mail.core.ui.compose.theme2.MainTheme import app.k9mail.feature.account.oauth.R @Composable @@ -44,21 +43,3 @@ internal fun SignInView( } } } - -@PreviewDevices -@Composable -internal fun SignInViewPreview() { - SignInView( - onSignInClick = {}, - isGoogleSignIn = false, - ) -} - -@PreviewDevices -@Composable -internal fun SignInViewWithGooglePreview() { - SignInView( - onSignInClick = {}, - isGoogleSignIn = true, - ) -} diff --git a/feature/account/oauth/src/main/kotlin/app/k9mail/feature/account/oauth/ui/view/SignInWithGoogleButton.kt b/feature/account/oauth/src/main/kotlin/app/k9mail/feature/account/oauth/ui/view/SignInWithGoogleButton.kt index 3f69f7aaf..631b27bb8 100644 --- a/feature/account/oauth/src/main/kotlin/app/k9mail/feature/account/oauth/ui/view/SignInWithGoogleButton.kt +++ b/feature/account/oauth/src/main/kotlin/app/k9mail/feature/account/oauth/ui/view/SignInWithGoogleButton.kt @@ -22,10 +22,8 @@ import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.TextStyle import androidx.compose.ui.text.font.FontWeight -import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp -import app.k9mail.core.ui.compose.theme.PreviewWithThemes import app.k9mail.feature.account.oauth.R import androidx.compose.material.Button as MaterialButton @@ -123,24 +121,3 @@ private fun getTextColor(isLight: Boolean): Color { Color(0xFFFFFFFF) } } - -@Preview(showBackground = true) -@Composable -internal fun SignInWithGoogleButtonPreview() { - PreviewWithThemes { - SignInWithGoogleButton( - onClick = {}, - ) - } -} - -@Preview(showBackground = true) -@Composable -internal fun SignInWithGoogleButtonDisabledPreview() { - PreviewWithThemes { - SignInWithGoogleButton( - onClick = {}, - enabled = false, - ) - } -}