Guard preview providers

This commit is contained in:
Max Goedjen 2020-03-11 23:07:22 -07:00
parent ccd0bf0ef3
commit 39e4059d51
No known key found for this signature in database
GPG Key ID: E58C21DD77B9B8E8
4 changed files with 16 additions and 0 deletions

View File

@ -81,6 +81,8 @@ extension ContentView {
}
#if DEBUG
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
Group {
@ -91,3 +93,5 @@ struct ContentView_Previews: PreviewProvider {
}
}
}
#endif

View File

@ -43,6 +43,8 @@ struct EmptyStoreModifiableView: View {
}
}
#if DEBUG
struct EmptyStoreModifiableView_Previews: PreviewProvider {
static var previews: some View {
Group {
@ -51,3 +53,5 @@ struct EmptyStoreModifiableView_Previews: PreviewProvider {
}
}
}
#endif

View File

@ -56,8 +56,12 @@ struct SecretDetailView<SecretType: Secret>: View {
}
#if DEBUG
struct SecretDetailView_Previews: PreviewProvider {
static var previews: some View {
SecretDetailView(secret: Preview.Store(numberOfRandomSecrets: 1).secrets[0])
}
}
#endif

View File

@ -122,8 +122,12 @@ extension SetupView {
}
#if DEBUG
struct SetupView_Previews: PreviewProvider {
static var previews: some View {
SetupView()
}
}
#endif