Fix preview

This commit is contained in:
Tibo De Peuter 2023-04-15 09:20:27 +02:00
parent 125e0a87d1
commit fcd8b249d4
2 changed files with 23 additions and 15 deletions

View file

@ -6,10 +6,12 @@ import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Menu
import androidx.compose.runtime.Composable
import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.ui.tooling.preview.Preview
import be.ugent.sel.studeez.R
import be.ugent.sel.studeez.resources
import be.ugent.sel.studeez.screens.drawer.Drawer
import be.ugent.sel.studeez.screens.navbar.NavigationBar
import be.ugent.sel.studeez.ui.theme.StudeezTheme
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.launch
@ -52,13 +54,13 @@ fun PrimaryScreenTemplate(
}
}
//@Preview
//@Composable
//fun PrimaryScreenPreview() {
// StudeezTheme {
// PrimaryScreenTemplate(
// "Preview screen",
// {}
// ) {}
// }
//}
@Preview
@Composable
fun PrimaryScreenPreview() {
StudeezTheme {
PrimaryScreenTemplate(
"Preview screen",
{ _, _ -> {}}
) {}
}
}

View file

@ -15,6 +15,7 @@ import androidx.compose.ui.unit.dp
import androidx.hilt.navigation.compose.hiltViewModel
import be.ugent.sel.studeez.ui.theme.StudeezTheme
@Composable
fun NavigationBar(
popUpAndOpen: (String, String) -> Unit,
@ -60,8 +61,13 @@ fun NavigationBar(
}
}
//@Preview(showBackground = true)
//@Composable
//fun NavigationBarPreview() {
// StudeezTheme { NavigationBar() }
//}
@Preview(showBackground = true)
@Composable
fun NavigationBarPreview() {
StudeezTheme {
NavigationBar(
{ _, _ -> {} },
hiltViewModel()
)
}
}