Change onboarding welcome feature to theme2

This commit is contained in:
Wolf-Martell Montwé 2024-04-22 16:13:39 +02:00
parent 0b623224b4
commit 8093881ce6
No known key found for this signature in database
GPG key ID: 6D45B21512ACBF72
4 changed files with 33 additions and 39 deletions

View file

@ -0,0 +1,16 @@
package app.k9mail.feature.onboarding.welcome.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 WelcomeContentPreview() {
PreviewWithTheme {
WelcomeContent(
onStartClick = {},
onImportClick = {},
)
}
}

View file

@ -0,0 +1,16 @@
package app.k9mail.feature.onboarding.welcome.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 WelcomeScreenThunderbirdPreview() {
PreviewWithTheme {
WelcomeScreen(
onStartClick = {},
onImportClick = {},
)
}
}

View file

@ -19,7 +19,6 @@ import androidx.compose.ui.graphics.Color
import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import app.k9mail.core.ui.compose.common.annotation.PreviewDevices
import app.k9mail.core.ui.compose.designsystem.atom.Surface import app.k9mail.core.ui.compose.designsystem.atom.Surface
import app.k9mail.core.ui.compose.designsystem.atom.button.ButtonFilled import app.k9mail.core.ui.compose.designsystem.atom.button.ButtonFilled
import app.k9mail.core.ui.compose.designsystem.atom.button.ButtonText import app.k9mail.core.ui.compose.designsystem.atom.button.ButtonText
@ -27,9 +26,7 @@ import app.k9mail.core.ui.compose.designsystem.atom.text.TextBodyLarge
import app.k9mail.core.ui.compose.designsystem.atom.text.TextDisplayMedium import app.k9mail.core.ui.compose.designsystem.atom.text.TextDisplayMedium
import app.k9mail.core.ui.compose.designsystem.template.LazyColumnWithHeaderFooter import app.k9mail.core.ui.compose.designsystem.template.LazyColumnWithHeaderFooter
import app.k9mail.core.ui.compose.designsystem.template.ResponsiveContent import app.k9mail.core.ui.compose.designsystem.template.ResponsiveContent
import app.k9mail.core.ui.compose.theme.K9Theme import app.k9mail.core.ui.compose.theme2.MainTheme
import app.k9mail.core.ui.compose.theme.MainTheme
import app.k9mail.core.ui.compose.theme.ThunderbirdTheme
import app.k9mail.feature.onboarding.welcome.R import app.k9mail.feature.onboarding.welcome.R
private const val CIRCLE_COLOR = 0xFFEEEEEE private const val CIRCLE_COLOR = 0xFFEEEEEE
@ -162,25 +159,3 @@ private fun Modifier.defaultItemModifier() = composed {
fillMaxWidth() fillMaxWidth()
.padding(MainTheme.spacings.default) .padding(MainTheme.spacings.default)
} }
@Composable
@PreviewDevices
internal fun WelcomeContentK9Preview() {
K9Theme {
WelcomeContent(
onStartClick = {},
onImportClick = {},
)
}
}
@Composable
@PreviewDevices
internal fun WelcomeContentThunderbirdPreview() {
ThunderbirdTheme {
WelcomeContent(
onStartClick = {},
onImportClick = {},
)
}
}

View file

@ -1,8 +1,6 @@
package app.k9mail.feature.onboarding.welcome.ui package app.k9mail.feature.onboarding.welcome.ui
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import app.k9mail.core.ui.compose.common.annotation.PreviewDevices
import app.k9mail.core.ui.compose.theme.ThunderbirdTheme
@Composable @Composable
fun WelcomeScreen( fun WelcomeScreen(
@ -14,14 +12,3 @@ fun WelcomeScreen(
onImportClick = onImportClick, onImportClick = onImportClick,
) )
} }
@Composable
@PreviewDevices
internal fun WelcomeScreenThunderbirdPreview() {
ThunderbirdTheme {
WelcomeScreen(
onStartClick = {},
onImportClick = {},
)
}
}