Skip to content

Commit 076f8c5

Browse files
committed
- Add Android previews for TopicList and TopicTopBar.
1 parent e4f9b5f commit 076f8c5

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package com.developersbreach.kotlindictionarymultiplatform.previews.topic
2+
3+
import androidx.compose.runtime.Composable
4+
import androidx.compose.ui.tooling.preview.PreviewLightDark
5+
import com.developersbreach.kotlindictionarymultiplatform.previews.sampleTopicList
6+
import com.developersbreach.kotlindictionarymultiplatform.ui.screens.topic.TopicList
7+
import com.developersbreach.kotlindictionarymultiplatform.ui.theme.KotlinDictionaryTheme
8+
9+
@PreviewLightDark
10+
@Composable
11+
fun TopicListPreview() {
12+
KotlinDictionaryTheme {
13+
TopicList(
14+
topics = sampleTopicList(),
15+
bookmarkedStates = List(sampleTopicList().size) { true },
16+
onBookmarkClick = {},
17+
onTopicClick = {},
18+
)
19+
}
20+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package com.developersbreach.kotlindictionarymultiplatform.previews.topic
2+
3+
import androidx.compose.runtime.Composable
4+
import androidx.compose.ui.tooling.preview.PreviewLightDark
5+
import com.developersbreach.kotlindictionarymultiplatform.ui.screens.topic.TopicTopBar
6+
import com.developersbreach.kotlindictionarymultiplatform.ui.theme.KotlinDictionaryTheme
7+
8+
@PreviewLightDark
9+
@Composable
10+
fun TopicTopBarPreview() {
11+
KotlinDictionaryTheme {
12+
TopicTopBar()
13+
}
14+
}

0 commit comments

Comments
 (0)