2022-12-29 16:22:07 +00:00
|
|
|
import SwiftUI
|
|
|
|
import Env
|
|
|
|
|
2022-12-30 17:40:10 +00:00
|
|
|
@MainActor
|
2022-12-29 16:22:07 +00:00
|
|
|
extension View {
|
|
|
|
public func statusEditorToolbarItem(routeurPath: RouterPath) -> some ToolbarContent {
|
|
|
|
ToolbarItem(placement: .navigationBarTrailing) {
|
|
|
|
Button {
|
|
|
|
routeurPath.presentedSheet = .newStatusEditor
|
|
|
|
} label: {
|
|
|
|
Image(systemName: "square.and.pencil")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-01-02 18:23:44 +00:00
|
|
|
|
|
|
|
public struct StatusEditorToolbarItem: ToolbarContent {
|
|
|
|
@EnvironmentObject private var routerPath: RouterPath
|
|
|
|
|
|
|
|
public init() { }
|
|
|
|
|
|
|
|
public var body: some ToolbarContent {
|
|
|
|
ToolbarItem(placement: .navigationBarTrailing) {
|
|
|
|
Button {
|
|
|
|
routerPath.presentedSheet = .newStatusEditor
|
|
|
|
} label: {
|
|
|
|
Image(systemName: "square.and.pencil")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|