2022-08-29 23:18:06 +02:00
|
|
|
package eu.kanade.presentation.browse
|
|
|
|
|
|
|
|
|
|
import androidx.compose.foundation.layout.Column
|
|
|
|
|
import androidx.compose.foundation.layout.padding
|
|
|
|
|
import androidx.compose.foundation.layout.statusBarsPadding
|
|
|
|
|
import androidx.compose.runtime.Composable
|
|
|
|
|
import androidx.compose.ui.Modifier
|
|
|
|
|
import androidx.compose.ui.res.stringResource
|
|
|
|
|
import eu.kanade.presentation.components.AppBar
|
|
|
|
|
import eu.kanade.presentation.components.AppBarActions
|
|
|
|
|
import eu.kanade.presentation.components.Scaffold
|
2022-08-31 20:43:58 +02:00
|
|
|
import eu.kanade.presentation.components.TabContent
|
2022-08-29 23:18:06 +02:00
|
|
|
|
|
|
|
|
@Composable
|
2022-08-31 20:43:58 +02:00
|
|
|
fun BrowseTabWrapper(tab: TabContent) {
|
2022-08-29 23:18:06 +02:00
|
|
|
Scaffold(
|
|
|
|
|
modifier = Modifier.statusBarsPadding(),
|
|
|
|
|
topBar = {
|
|
|
|
|
AppBar(
|
|
|
|
|
title = stringResource(tab.titleRes),
|
|
|
|
|
actions = {
|
|
|
|
|
AppBarActions(tab.actions)
|
|
|
|
|
},
|
|
|
|
|
)
|
|
|
|
|
},
|
|
|
|
|
) { paddingValues ->
|
|
|
|
|
Column(modifier = Modifier.padding(paddingValues)) {
|
|
|
|
|
tab.content()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|