Use old Previews syntax

This commit is contained in:
Arkadiusz Fal 2024-02-02 11:31:34 +01:00
parent f4c310846a
commit d5464186af
4 changed files with 31 additions and 23 deletions

View File

@ -158,8 +158,10 @@ struct ExportSettings: View {
}
}
#Preview {
struct ExportSettings_Previews: PreviewProvider {
static var previews: some View {
NavigationView {
ExportSettings()
}
}
}

View File

@ -171,7 +171,8 @@ struct ImportSettingsAccountRow: View {
}
}
#Preview {
struct ImportSettingsAccountRow_Previews: PreviewProvider {
static var previews: some View {
let fileModel = ImportSettingsFileModel(url: URL(string: "https://gist.githubusercontent.com/arekf/578668969c9fdef1b3828bea864c3956/raw/f794a95a20261bcb1145e656c8dda00bea339e2a/yattee-recents.yatteesettings")!)
return List {
@ -184,4 +185,5 @@ struct ImportSettingsAccountRow: View {
fileModel: fileModel
)
}
}
}

View File

@ -255,6 +255,8 @@ struct ImportSettingsSheetView: View {
}
}
#Preview {
struct ImportSettingsSheetView_Previews: PreviewProvider {
static var previews: some View {
ImportSettingsSheetView(settingsFile: .constant(URL(string: "https://gist.githubusercontent.com/arekf/578668969c9fdef1b3828bea864c3956/raw/f794a95a20261bcb1145e656c8dda00bea339e2a/yattee-recents.yatteesettings")!))
}
}

View File

@ -14,7 +14,8 @@ struct ImportSettingsSheetViewModifier: ViewModifier {
}
}
#Preview {
struct ImportSettingsSheetViewModifier_Previews: PreviewProvider {
static var previews: some View {
Text("")
.modifier(
ImportSettingsSheetViewModifier(
@ -22,4 +23,5 @@ struct ImportSettingsSheetViewModifier: ViewModifier {
settingsFile: .constant(URL(string: "https://gist.githubusercontent.com/arekf/87b4d6702755b01139431dcb809f9fdc/raw/7bb5cdba3ffc0c479f5260430ddc43c4a79a7a72/yattee-177-iPhone.yatteesettings")!)
)
)
}
}