-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathLocationView.swift
41 lines (37 loc) · 974 Bytes
/
LocationView.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//
// LocationView.swift
// Coldwave
//
// Created by Raffaele Sena on 7/31/23.
//
import SwiftUI
struct LocationView: View {
// Only available in macOS 12.0 or later
//@Environment(\.dismiss) private var dismiss
@State private var location : String = ""
var body: some View {
VStack {
HStack {
Text("Location:")
TextField("Enter location of audio file, stream or playlist", text: $location)
}
HStack {
Button("Cancel") {
location = ""
//dismiss()
}
Button("Open") {
print(location)
//dismiss()
}
}
.frame(maxWidth: .infinity, alignment: .trailing)
}
.padding(.all)
}
}
struct LocationView_Previews: PreviewProvider {
static var previews: some View {
LocationView()
}
}