From 3fa12441fa759e0b48c046b0123379744faaac00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20G=C3=B6ransson?= Date: Fri, 22 Sep 2023 11:32:28 +0200 Subject: [PATCH] Add previews --- .../mullvadvpn/compose/component/TopBar.kt | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/TopBar.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/TopBar.kt index 1b2c24c27214..8f2277ad2a6e 100644 --- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/TopBar.kt +++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/TopBar.kt @@ -35,6 +35,34 @@ private fun PreviewTopBar() { } } +@Preview +@Composable +private fun PreviewNoIconAndLogoTopBar() { + AppTheme { + TopBar( + backgroundColor = MaterialTheme.colorScheme.inversePrimary, + iconTintColor = MaterialTheme.colorScheme.onPrimary, + isIconAndLogoVisible = false, + onSettingsClicked = {}, + onAccountClicked = null, + ) + } +} + +@Preview +@Composable +private fun PreviewNothingTopBar() { + AppTheme { + TopBar( + backgroundColor = MaterialTheme.colorScheme.inversePrimary, + iconTintColor = MaterialTheme.colorScheme.onPrimary, + isIconAndLogoVisible = false, + onSettingsClicked = null, + onAccountClicked = null + ) + } +} + @Composable fun TopBar( backgroundColor: Color,