mirror of
https://github.com/yattee/yattee.git
synced 2025-08-09 20:24:06 +00:00
Search history for tab navigation
This commit is contained in:
@@ -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 }
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user