Skip to content

Commit 8416e83

Browse files
committed
Revert CounterExample, accidentally committed experiment
1 parent cf47caa commit 8416e83

File tree

1 file changed

+8
-32
lines changed

1 file changed

+8
-32
lines changed

Examples/Sources/CounterExample/CounterApp.swift

Lines changed: 8 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import DefaultBackend
2-
import Foundation
32
import SwiftCrossUI
43

54
#if canImport(SwiftBundlerRuntime)
@@ -10,45 +9,22 @@ import SwiftCrossUI
109
@HotReloadable
1110
struct CounterApp: App {
1211
@State var count = 0
13-
@State var theme: ColorScheme = .dark
14-
15-
@Environment(\.openURL) var openURL
1612

1713
var body: some Scene {
1814
WindowGroup("CounterExample: \(count)") {
1915
#hotReloadable {
20-
ZStack {
21-
theme == .dark ? Color.black : Color.white
22-
23-
VStack {
24-
HStack(spacing: 20) {
25-
Button("-") {
26-
count -= 1
27-
}
28-
Text("Count: \(count)")
29-
Button("+") {
30-
count += 1
31-
}
16+
VStack {
17+
HStack(spacing: 20) {
18+
Button("-") {
19+
count -= 1
3220
}
33-
.padding()
34-
35-
Menu("Settings") {
36-
Text("Current theme: \(theme)")
37-
Menu("Theme") {
38-
Button("Light") {
39-
theme = .light
40-
}
41-
Button("Dark") {
42-
theme = .dark
43-
}
44-
}
45-
Button("Open documentation") {
46-
openURL(URL(string: "https://stackotter.dev")!)
47-
}
21+
Text("Count: \(count)")
22+
Button("+") {
23+
count += 1
4824
}
4925
}
26+
.padding()
5027
}
51-
.colorScheme(.dark)
5228
}
5329
}
5430
.defaultSize(width: 400, height: 200)

0 commit comments

Comments
 (0)