-
Notifications
You must be signed in to change notification settings - Fork 59
Expand file tree
/
Copy pathContentView.swift
More file actions
69 lines (64 loc) · 1.84 KB
/
Copy pathContentView.swift
File metadata and controls
69 lines (64 loc) · 1.84 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
//
// ContentView.swift
// RoadmapExample
//
// Created by Antoine van der Lee on 19/02/2023.
//
import Roadmap
import SwiftUI
struct ContentView: View {
let configuration = RoadmapConfiguration(
sidetrackRoadmapId: "669827fe83191f8a3a802b4d",
style: RoadmapTemplate.standard.style,
allowVotes: true,
allowSearching: true,
allowsFilterByStatus: true
)
var body: some View {
#if os(macOS)
roadmapView
#elseif os(visionOS)
NavigationStack {
roadmapView
}
#else
NavigationView {
roadmapView
}
#endif
}
private var roadmapView: some View {
RoadmapView(
configuration: configuration,
header: {
GroupBox {
HStack {
Text("You can add a header to introduce your users to your Roadmap.")
.padding(10)
Spacer()
}
.frame(maxWidth: .infinity)
}.padding(.vertical, 20)
}, footer: {
HStack {
Spacer()
Text("Feature Voting with [Roadmap](https://github.com/AvdLee/Roadmap)")
Spacer()
}.padding(.vertical, 10)
})
.navigationTitle("Roadmap Example")
.toolbar {
ToolbarItem {
Link(destination: URL(string: "https://github.com/AvdLee/Roadmap")!) {
Image(systemName: "questionmark")
.symbolRenderingMode(.hierarchical)
}
}
}
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}