@@ -10,49 +10,50 @@ import SwiftNEW
1010
1111struct ContentView : View {
1212
13- @State var preview : String = " Normal "
13+ @State var preview : String = " Simple "
1414
1515 // MARK: All States
1616 @State var showNew : Bool = false
17- @State var align : HorizontalAlignment = . center
18- @State var color : Color = . accentColor
19- @State var size : String = " normal "
20- #if os(iOS) || os(xrOS)
21- @State var labelColor : Color = Color ( UIColor . systemBackground)
22- #elseif os(macOS)
23- @State var labelColor : Color = Color ( NSColor . windowBackgroundColor)
24- #endif
25- @State var label : String = " Show Release Note "
26- @State var labelImage : String = " arrow.up.circle.fill "
27- @State var history : Bool = true
28- @State var data : String = " data "
29- @State var showDrop : Bool = false
17+ // Optional
18+ // @State var align: HorizontalAlignment = .center
19+ // @State var color: Color = .accentColor
20+ // @State var size: String = "simple"
21+ // #if os(iOS) || os(visionOS)
22+ // @State var labelColor: Color = Color(UIColor.systemBackground)
23+ // #elseif os(macOS)
24+ // @State var labelColor: Color = Color(NSColor.windowBackgroundColor)
25+ // #endif
26+ // @State var label: String = "Show Release Note"
27+ // @State var labelImage: String = "arrow.up.circle.fill"
28+ // @State var history: Bool = true
29+ // @State var data: String = "data"
30+ // @State var showDrop: Bool = false
3031
31- var normal : some View {
32- SwiftNEW ( show: $showNew, align : $align , color : $color , size : $size , labelColor : $labelColor , label : $label , labelImage : $labelImage , history : $history , data : $data , showDrop : $showDrop )
32+ var simple : some View {
33+ SwiftNEW ( show: $showNew)
3334 }
3435
3536 var mini : some View {
3637 // MARK: Mini (Toolbar / List only)
3738 List {
3839 Section ( header: Text ( " Compatible with Toolbar / List " ) ) {
39- SwiftNEW ( show: $showNew, align : $align , color : $color , size: . constant( " mini " ) , labelColor : $labelColor , label : $label , labelImage : $labelImage , history : $history , data : $data , showDrop : $showDrop )
40+ SwiftNEW ( show: $showNew, size: . constant( " mini " ) )
4041 }
4142 }
4243 }
4344
4445 var invisible : some View {
45- SwiftNEW ( show: $showNew, align : $align , color : $color , size: . constant( " invisible " ) , labelColor : $labelColor , label : $label , labelImage : $labelImage , history : $history , data : $data , showDrop : $showDrop )
46+ SwiftNEW ( show: $showNew, size: . constant( " invisible " ) )
4647 }
4748
4849 var remote : some View {
4950 // MARK: Remote (>3.0.0) - Firebase Real Time Database Demo (Compatible with json format)
50- SwiftNEW ( show: $showNew, align : $align , color : $color , size : $size , labelColor : $labelColor , label : $label , labelImage: . constant( " icloud " ) , history : $history , data: . constant( " https://testground-a937f-default-rtdb.firebaseio.com/.json?print=pretty " ) , showDrop : $showDrop )
51+ SwiftNEW ( show: $showNew, labelImage: . constant( " icloud " ) , data: . constant( " https://testground-a937f-default-rtdb.firebaseio.com/.json?print=pretty " ) )
5152 }
5253
5354 var drop : some View {
5455 // MARK: Drop (>3.4.0) - Recommended trigger with Remote Notification
55- SwiftNEW ( show: $showNew, align : $align , color : $color , size : $size , labelColor : $labelColor , label: . constant( " Notification " ) , labelImage: . constant( " bell.badge " ) , history : $history , data: . constant( " https://testground-a937f-default-rtdb.firebaseio.com/.json?print=pretty " ) , showDrop: . constant( true ) )
56+ SwiftNEW ( show: $showNew, label: . constant( " Notification " ) , labelImage: . constant( " bell.badge " ) , data: . constant( " https://testground-a937f-default-rtdb.firebaseio.com/.json?print=pretty " ) , showDrop: . constant( true ) )
5657 }
5758
5859 var body : some View {
@@ -61,19 +62,19 @@ struct ContentView: View {
6162 tab
6263 }
6364 . navigationViewStyle ( . stack)
64- #elseif os(macOS) || os(xrOS )
65+ #elseif os(macOS) || os(visionOS )
6566 tab. padding ( )
6667 #endif
6768 }
6869
6970 var tab : some View {
70- // MARK: Choose either one size (Normal , Mini or Invisible)
71+ // MARK: Choose either one size (Simple , Mini or Invisible)
7172 TabView ( selection: $preview) {
72- normal
73+ simple
7374 . tabItem {
74- Label ( " Normal " , systemImage: " textformat.size.larger " )
75+ Label ( " Simple " , systemImage: " textformat.size.larger " )
7576 }
76- . tag ( " Normal " )
77+ . tag ( " Simple " )
7778 mini
7879 . tabItem {
7980 Label ( " Mini " , systemImage: " textformat.size.smaller " )
@@ -99,7 +100,7 @@ struct ContentView: View {
99100 }
100101 . toolbar {
101102 if preview == " Mini " {
102- SwiftNEW ( show: $showNew, align : $align , color : $color , size: . constant( " mini " ) , labelColor : $labelColor , label : $label , labelImage : $labelImage , history : $history , data : $data , showDrop : $showDrop )
103+ SwiftNEW ( show: $showNew, size: . constant( " mini " ) )
103104 }
104105 }
105106 }
0 commit comments