mirror of
https://github.com/yattee/yattee.git
synced 2024-12-13 13:50:32 +05:30
23 lines
535 B
Swift
23 lines
535 B
Swift
import Foundation
|
|
import SwiftUI
|
|
|
|
private struct InNavigationViewKey: EnvironmentKey {
|
|
static let defaultValue = false
|
|
}
|
|
|
|
private struct HorizontalCellsKey: EnvironmentKey {
|
|
static let defaultValue = false
|
|
}
|
|
|
|
extension EnvironmentValues {
|
|
var inNavigationView: Bool {
|
|
get { self[InNavigationViewKey.self] }
|
|
set { self[InNavigationViewKey.self] = newValue }
|
|
}
|
|
|
|
var horizontalCells: Bool {
|
|
get { self[HorizontalCellsKey.self] }
|
|
set { self[HorizontalCellsKey.self] = newValue }
|
|
}
|
|
}
|