mirror of
https://github.com/writeas/writefreely-swiftui-multiplatform.git
synced 2024-11-15 01:11:02 +00:00
Add CollectionPicker view for testing collection-selection functionality
This commit is contained in:
parent
f8de848400
commit
97a02b8530
20
Shared/PostCollection/CollectionPicker.swift
Normal file
20
Shared/PostCollection/CollectionPicker.swift
Normal file
@ -0,0 +1,20 @@
|
||||
import SwiftUI
|
||||
|
||||
struct CollectionPicker: View {
|
||||
@Binding var selectedCollection: PostCollection
|
||||
|
||||
private let collections = [
|
||||
defaultDraftCollection,
|
||||
testPostCollection1,
|
||||
testPostCollection2,
|
||||
testPostCollection3
|
||||
]
|
||||
|
||||
var body: some View {
|
||||
Picker("Collection", selection: $selectedCollection) {
|
||||
ForEach(collections) { collection in
|
||||
Text(collection.title).tag(collection)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -9,6 +9,8 @@
|
||||
/* Begin PBXBuildFile section */
|
||||
171BFDF724D49FD400888236 /* PostCollection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 171BFDF624D49FD400888236 /* PostCollection.swift */; };
|
||||
171BFDF824D49FD400888236 /* PostCollection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 171BFDF624D49FD400888236 /* PostCollection.swift */; };
|
||||
171BFDFA24D4AF8300888236 /* CollectionPicker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 171BFDF924D4AF8300888236 /* CollectionPicker.swift */; };
|
||||
171BFDFB24D4AF8300888236 /* CollectionPicker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 171BFDF924D4AF8300888236 /* CollectionPicker.swift */; };
|
||||
1756AE6B24CB1E4B00FD7257 /* Post.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1756AE6A24CB1E4B00FD7257 /* Post.swift */; };
|
||||
1756AE6C24CB1E4B00FD7257 /* Post.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1756AE6A24CB1E4B00FD7257 /* Post.swift */; };
|
||||
1756AE6E24CB255B00FD7257 /* PostStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1756AE6D24CB255B00FD7257 /* PostStore.swift */; };
|
||||
@ -53,6 +55,7 @@
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
171BFDF624D49FD400888236 /* PostCollection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PostCollection.swift; sourceTree = "<group>"; };
|
||||
171BFDF924D4AF8300888236 /* CollectionPicker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CollectionPicker.swift; sourceTree = "<group>"; };
|
||||
1756AE6A24CB1E4B00FD7257 /* Post.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Post.swift; sourceTree = "<group>"; };
|
||||
1756AE6D24CB255B00FD7257 /* PostStore.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PostStore.swift; sourceTree = "<group>"; };
|
||||
1756AE7324CB26FA00FD7257 /* PostCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PostCell.swift; sourceTree = "<group>"; };
|
||||
@ -241,6 +244,7 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
171BFDF624D49FD400888236 /* PostCollection.swift */,
|
||||
171BFDF924D4AF8300888236 /* CollectionPicker.swift */,
|
||||
);
|
||||
path = PostCollection;
|
||||
sourceTree = "<group>";
|
||||
@ -459,6 +463,7 @@
|
||||
files = (
|
||||
17DF32AC24C87D3500BCE2E3 /* ContentView.swift in Sources */,
|
||||
1756AE8124CB844500FD7257 /* View+Keyboard.swift in Sources */,
|
||||
171BFDFA24D4AF8300888236 /* CollectionPicker.swift in Sources */,
|
||||
1756AE7724CB2EDD00FD7257 /* PostEditor.swift in Sources */,
|
||||
17DF32D524C8CA3400BCE2E3 /* PostStatusBadge.swift in Sources */,
|
||||
1756AE7A24CB65DF00FD7257 /* PostList.swift in Sources */,
|
||||
@ -479,6 +484,7 @@
|
||||
1756AE7824CB2EDD00FD7257 /* PostEditor.swift in Sources */,
|
||||
17DF32D624C8CA3400BCE2E3 /* PostStatusBadge.swift in Sources */,
|
||||
1756AE7B24CB65DF00FD7257 /* PostList.swift in Sources */,
|
||||
171BFDFB24D4AF8300888236 /* CollectionPicker.swift in Sources */,
|
||||
17DF32AB24C87D3500BCE2E3 /* WriteFreely_MultiPlatformApp.swift in Sources */,
|
||||
1756AE6F24CB255B00FD7257 /* PostStore.swift in Sources */,
|
||||
1756AE6C24CB1E4B00FD7257 /* Post.swift in Sources */,
|
||||
|
Loading…
Reference in New Issue
Block a user