Skip to content

Commit

Permalink
Add test case for #89 (#91)
Browse files Browse the repository at this point in the history
Co-authored-by: Sindre Sorhus <[email protected]>
  • Loading branch information
davidwernhart and sindresorhus committed Jan 23, 2023
1 parent 637c8eb commit 9b4d3a7
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Example/AccountsScreen.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ struct AccountsScreen: View {
@State private var selection1 = 1
@State private var selection2 = 0
@State private var selection3 = 0
@State private var isExpanded = false
private let contentWidth: Double = 450.0

var body: some View {
Expand Down Expand Up @@ -69,6 +70,19 @@ struct AccountsScreen: View {
Text("Automatic mode can slow things down.")
.preferenceDescription()
}
Settings.Section(title: "Expand this pane:") {
Toggle("Expand", isOn: $isExpanded)
if isExpanded {
ZStack(alignment: .center) {
Rectangle()
.fill(.gray)
.frame(width: 200, height: 200)
.cornerRadius(20)
Text("🦄")
.frame(width: 180, height: 180)
}
}
}
}
}
}
Expand Down

0 comments on commit 9b4d3a7

Please sign in to comment.