struct ContentView: View {
@State private var isPresented = false
var body: some View {
VStack {
Button("Press to show details") {
withAnimation {
isPresented.toggle()
}
}
if isPresented {
// Starts small and grows to full size.
Text("Details go here.")
.transition(.scale)
}
}
}
}