mirror of
https://github.com/writeas/writefreely-swiftui-multiplatform.git
synced 2024-11-15 01:11:02 +00:00
Get SwiftUI previews working with debug data
This commit is contained in:
parent
21e8a4ca35
commit
c14a03a332
@ -18,7 +18,9 @@ struct ContentView: View {
|
||||
|
||||
struct ContentView_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
ContentView()
|
||||
.environmentObject(WriteFreelyModel())
|
||||
let model = WriteFreelyModel()
|
||||
model.collections = CollectionListModel(with: [userCollection1, userCollection2, userCollection3])
|
||||
return ContentView()
|
||||
.environmentObject(model)
|
||||
}
|
||||
}
|
||||
|
@ -8,6 +8,9 @@ struct SidebarView: View {
|
||||
|
||||
struct SidebarView_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
SidebarView()
|
||||
let model = WriteFreelyModel()
|
||||
model.collections = CollectionListModel(with: [userCollection1, userCollection2, userCollection3])
|
||||
return SidebarView()
|
||||
.environmentObject(model)
|
||||
}
|
||||
}
|
||||
|
@ -20,6 +20,9 @@ struct CollectionListView: View {
|
||||
|
||||
struct CollectionSidebar_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
CollectionListView()
|
||||
let model = WriteFreelyModel()
|
||||
model.collections = CollectionListModel(with: [userCollection1, userCollection2, userCollection3])
|
||||
return CollectionListView()
|
||||
.environmentObject(model)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user