Configure dark theme on current screens
- Show light and dark screen previews for current composables
This commit is contained in:
parent
d87431bce2
commit
3368f38a45
3 changed files with 32 additions and 4 deletions
|
@ -6,6 +6,8 @@ import androidx.compose.material3.Text
|
|||
import androidx.compose.material3.TopAppBar
|
||||
import androidx.compose.material3.TopAppBarDefaults.topAppBarColors
|
||||
import androidx.compose.runtime.Composable
|
||||
import org.jetbrains.compose.ui.tooling.preview.Preview
|
||||
import ui.theme.KeeTheme
|
||||
|
||||
@OptIn(ExperimentalMaterial3Api::class)
|
||||
@Composable
|
||||
|
@ -22,3 +24,15 @@ fun KeeTopAppBar(
|
|||
}
|
||||
)
|
||||
}
|
||||
|
||||
@Preview
|
||||
@Composable
|
||||
private fun TopAppBarLightPreview() = KeeTheme(useDarkTheme = false) {
|
||||
KeeTopAppBar("Kee Wallet")
|
||||
}
|
||||
|
||||
@Preview
|
||||
@Composable
|
||||
private fun TopAppBarDarkPreview() = KeeTheme(useDarkTheme = true) {
|
||||
KeeTopAppBar("Kee Wallet")
|
||||
}
|
||||
|
|
|
@ -13,11 +13,12 @@ import net.agorise.kee.getPlatform
|
|||
import net.agorise.kee.ui.component.topappbar.KeeTopAppBar
|
||||
import net.agorise.kee.ui.screen.importaccount.ImportAccountScreen
|
||||
import org.jetbrains.compose.ui.tooling.preview.Preview
|
||||
import ui.theme.KeeTheme
|
||||
|
||||
class HomeScreen : Screen {
|
||||
|
||||
@Composable
|
||||
override fun Content() {
|
||||
override fun Content() = KeeTheme {
|
||||
HomeScreenContent()
|
||||
}
|
||||
}
|
||||
|
@ -46,6 +47,12 @@ private fun HomeScreenContent() {
|
|||
|
||||
@Preview
|
||||
@Composable
|
||||
private fun HomeScreenContentPreview() {
|
||||
private fun HomeScreenContentLightPreview() = KeeTheme(useDarkTheme = false) {
|
||||
HomeScreenContent()
|
||||
}
|
||||
|
||||
@Preview
|
||||
@Composable
|
||||
private fun HomeScreenContentDarkPreview() = KeeTheme(useDarkTheme = true) {
|
||||
HomeScreenContent()
|
||||
}
|
||||
|
|
|
@ -15,11 +15,12 @@ import net.agorise.kee.ui.screen.home.HomeScreen
|
|||
import org.jetbrains.compose.resources.ExperimentalResourceApi
|
||||
import org.jetbrains.compose.resources.vectorResource
|
||||
import org.jetbrains.compose.ui.tooling.preview.Preview
|
||||
import ui.theme.KeeTheme
|
||||
|
||||
class ImportAccountScreen : Screen {
|
||||
|
||||
@Composable
|
||||
override fun Content() {
|
||||
override fun Content() = KeeTheme {
|
||||
ImportAccountScreenContent()
|
||||
}
|
||||
}
|
||||
|
@ -65,6 +66,12 @@ private fun ImportAccountScreenContent() {
|
|||
|
||||
@Preview
|
||||
@Composable
|
||||
private fun ImportAccountScreenContentPreview() {
|
||||
private fun ImportAccountScreenContentLightPreview() = KeeTheme(useDarkTheme = false) {
|
||||
ImportAccountScreenContent()
|
||||
}
|
||||
|
||||
@Preview
|
||||
@Composable
|
||||
private fun ImportAccountScreenContentDarkPreview() = KeeTheme(useDarkTheme = true) {
|
||||
ImportAccountScreenContent()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue