From e94346583eec5f9b70f3ba1699623a2b962af0cd Mon Sep 17 00:00:00 2001 From: Max Goedjen Date: Sun, 27 Feb 2022 13:30:18 -0800 Subject: [PATCH] Preview --- Sources/Secretive/Views/ContentView.swift | 2 +- Sources/Secretive/Views/CreateSecretView.swift | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Sources/Secretive/Views/ContentView.swift b/Sources/Secretive/Views/ContentView.swift index c14e48e..2699062 100644 --- a/Sources/Secretive/Views/ContentView.swift +++ b/Sources/Secretive/Views/ContentView.swift @@ -88,7 +88,7 @@ extension ContentView { }, label: { Image(systemName: "plus") }) - .popover(isPresented: $showingCreation, attachmentAnchor: .point(.bottom), arrowEdge: .bottom) { + .sheet(isPresented: $showingCreation) { if let modifiable = storeList.modifiableStore { CreateSecretView(store: modifiable, showing: $showingCreation) } diff --git a/Sources/Secretive/Views/CreateSecretView.swift b/Sources/Secretive/Views/CreateSecretView.swift index 318226d..5998786 100644 --- a/Sources/Secretive/Views/CreateSecretView.swift +++ b/Sources/Secretive/Views/CreateSecretView.swift @@ -55,3 +55,16 @@ struct CreateSecretView: View { showing = false } } + +#if DEBUG + +struct CreateSecretView_Previews: PreviewProvider { + + static var previews: some View { + Group { + CreateSecretView(store: Preview.StoreModifiable(), showing: .constant(true)) + } + } +} + +#endif