Search history for tab navigation

This commit is contained in:
Arkadiusz Fal
2021-09-19 14:42:47 +02:00
parent ee1cb924c9
commit bede29dd51
8 changed files with 117 additions and 27 deletions

View File

@@ -9,6 +9,14 @@ private struct HorizontalCellsKey: EnvironmentKey {
static let defaultValue = false
}
enum NavigationStyle {
case tab, sidebar
}
private struct NavigationStyleKey: EnvironmentKey {
static let defaultValue = NavigationStyle.tab
}
extension EnvironmentValues {
var inNavigationView: Bool {
get { self[InNavigationViewKey.self] }
@@ -19,4 +27,9 @@ extension EnvironmentValues {
get { self[HorizontalCellsKey.self] }
set { self[HorizontalCellsKey.self] = newValue }
}
var navigationStyle: NavigationStyle {
get { self[NavigationStyleKey.self] }
set { self[NavigationStyleKey.self] = newValue }
}
}