Skip to content

Commit 63a52f9

Browse files
committed
Show inherited tint in the styling playground
1 parent 209cb00 commit 63a52f9

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

Demo/App.swiftpm/Sources/StylePlaygrounds.swift

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,20 @@ import SwiftUI
66

77
struct StylePlayground: View {
88
@State private var taps = 0
9+
@State private var toggle = true
10+
@State private var slider = 0.5
911
var body: some View {
1012
ScrollView {
1113
VStack(alignment: .leading, spacing: 0) {
14+
Example("Inherited tint") {
15+
VStack(alignment: .leading, spacing: 10) {
16+
Button("Tinted button") { taps += 1 }
17+
Toggle("Tinted toggle", isOn: $toggle)
18+
Slider(value: $slider, in: 0...1)
19+
ProgressView(value: slider)
20+
}
21+
.tint(.pink)
22+
}
1223
Example("Inherited font") {
1324
VStack(alignment: .leading, spacing: 6) {
1425
Text("All three")

0 commit comments

Comments
 (0)