NetNewsWire/Multiplatform/Shared/Sidebar/SidebarContainerView.swift

36 lines
798 B
Swift
Raw Normal View History

//
// SidebarContainerView.swift
// NetNewsWire
//
// Created by Maurice Parker on 6/28/20.
// Copyright © 2020 Ranchero Software. All rights reserved.
//
import SwiftUI
struct SidebarContainerView: View {
2020-07-12 01:22:47 +02:00
@Environment(\.undoManager) var undoManager
@EnvironmentObject private var sceneModel: SceneModel
@State private var showSettings: Bool = false
@ViewBuilder var body: some View {
SidebarView()
.modifier(SidebarToolbarModifier())
.modifier(SidebarListStyleModifier())
2020-07-12 01:22:47 +02:00
.environmentObject(sceneModel.sidebarModel)
.onAppear {
2020-07-12 01:22:47 +02:00
sceneModel.sidebarModel.undoManager = undoManager
}
}
}
struct SidebarContainerView_Previews: PreviewProvider {
static var previews: some View {
SidebarContainerView()
.environmentObject(SceneModel())
}
}