Skip to content

Commit 23aaf2d

Browse files
committed
Show inherited disabled across every control
1 parent bc186b5 commit 23aaf2d

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

Demo/App.swiftpm/Sources/StylePlaygrounds.swift

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ struct StylePlayground: View {
88
@State private var taps = 0
99
@State private var toggle = true
1010
@State private var slider = 0.5
11+
@State private var name = ""
1112
var body: some View {
1213
ScrollView {
1314
VStack(alignment: .leading, spacing: 0) {
@@ -52,9 +53,11 @@ struct StylePlayground: View {
5253
}
5354
Example("Inherited disabled") {
5455
VStack(alignment: .leading, spacing: 8) {
55-
Text("Both buttons are disabled (taps: \(taps))")
56-
Button("First") { taps += 1 }
57-
Button("Second") { taps += 1 }
56+
Text("Every control below is disabled (taps: \(taps))")
57+
Button("Button") { taps += 1 }
58+
Toggle("Toggle", isOn: $toggle)
59+
Slider(value: $slider, in: 0...1)
60+
TextField("TextField", text: $name)
5861
}
5962
.disabled(true)
6063
}

0 commit comments

Comments
 (0)