mirror of
https://github.com/yattee/yattee.git
synced 2026-02-20 17:59:45 +00:00
Yattee v2 rewrite
This commit is contained in:
25
Yattee/Views/Navigation/SidebarAdaptableModifier.swift
Normal file
25
Yattee/Views/Navigation/SidebarAdaptableModifier.swift
Normal file
@@ -0,0 +1,25 @@
|
||||
//
|
||||
// SidebarAdaptableModifier.swift
|
||||
// Yattee
|
||||
//
|
||||
// Navigation-related view modifiers.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
// MARK: - Sidebar Adaptable Modifier
|
||||
|
||||
#if os(iOS)
|
||||
struct SidebarAdaptableModifier: ViewModifier {
|
||||
func body(content: Content) -> some View {
|
||||
content.tabViewStyle(.sidebarAdaptable)
|
||||
}
|
||||
}
|
||||
|
||||
extension View {
|
||||
/// Applies sidebar adaptable style.
|
||||
func sidebarAdaptable() -> some View {
|
||||
modifier(SidebarAdaptableModifier())
|
||||
}
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user