54 lines
1.1 KiB
Swift
54 lines
1.1 KiB
Swift
//
|
|
// SidebarToolbar.swift
|
|
// Multiplatform iOS
|
|
//
|
|
// Created by Stuart Breckenridge on 30/6/20.
|
|
// Copyright © 2020 Ranchero Software. All rights reserved.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
struct SidebarToolbar: View {
|
|
|
|
@State private var showSettings: Bool = false
|
|
|
|
var body: some View {
|
|
VStack {
|
|
Divider()
|
|
HStack(alignment: .center) {
|
|
Button(action: {
|
|
showSettings = true
|
|
}, label: {
|
|
Image(systemName: "gear")
|
|
.font(.title3)
|
|
.foregroundColor(.accentColor)
|
|
}).help("Settings")
|
|
Spacer()
|
|
Text("Last updated")
|
|
.font(.caption)
|
|
.foregroundColor(.secondary)
|
|
Spacer()
|
|
Button(action: {}, label: {
|
|
Image(systemName: "plus")
|
|
.font(.title3)
|
|
.foregroundColor(.accentColor)
|
|
}).help("Add")
|
|
}
|
|
.padding(.horizontal, 16)
|
|
.padding(.bottom, 12)
|
|
.padding(.top, 4)
|
|
}
|
|
.background(VisualEffectBlur(blurStyle: .systemChromeMaterial).edgesIgnoringSafeArea(.bottom))
|
|
.sheet(isPresented: $showSettings, onDismiss: { showSettings = false }) {
|
|
SettingsView()
|
|
}
|
|
|
|
}
|
|
}
|
|
|
|
struct SidebarToolbar_Previews: PreviewProvider {
|
|
static var previews: some View {
|
|
SidebarToolbar()
|
|
}
|
|
}
|