Skip to content

Commit

Permalink
#13 Refactor preview
Browse files Browse the repository at this point in the history
  • Loading branch information
dranoer committed Aug 29, 2023
1 parent 26bc260 commit 71b511b
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions app/src/main/java/com/dranoer/photoalbum/ui/album/AlbumScreen.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.dranoer.photoalbum.ui.album

import android.content.res.Configuration
import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
Expand Down Expand Up @@ -139,17 +140,19 @@ private fun AlbumList(
}

//region Preview
@Preview
@Preview(name = "LightTheme", uiMode = Configuration.UI_MODE_NIGHT_NO)
@Preview(name = "DarkTheme", uiMode = Configuration.UI_MODE_NIGHT_YES)
@Composable
private fun AlbumPreview_Normal() {
private fun AlbumPreview() {
PhotoAlbumTheme {
AlbumScreen(navigateToPhoto = {})
}
}

@Preview
@Preview(name = "LightTheme", uiMode = Configuration.UI_MODE_NIGHT_NO)
@Preview(name = "DarkTheme", uiMode = Configuration.UI_MODE_NIGHT_YES)
@Composable
private fun AlbumListPreview_Normal() {
private fun AlbumListPreview() {
PhotoAlbumTheme {
AlbumList(
data = listOf(
Expand Down

0 comments on commit 71b511b

Please sign in to comment.