diff options
| author | Dustin Mierau <dustin@mierau.me> | 2023-12-05 15:57:27 -0800 |
|---|---|---|
| committer | Dustin Mierau <dustin@mierau.me> | 2023-12-05 15:57:27 -0800 |
| commit | b99219f16792be4a06a89f1f32a59f0bf97bba68 (patch) | |
| tree | 4503d6f8b8c980c073c0e899da014bbffc4f7e94 /Hotline/Views/FileListView.swift | |
| parent | b1a176ba3da2c7cf815084f0f8109008fe763809 (diff) | |
Experimenting with files.
Diffstat (limited to 'Hotline/Views/FileListView.swift')
| -rw-r--r-- | Hotline/Views/FileListView.swift | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Hotline/Views/FileListView.swift b/Hotline/Views/FileListView.swift new file mode 100644 index 0000000..852fce4 --- /dev/null +++ b/Hotline/Views/FileListView.swift @@ -0,0 +1,22 @@ +import SwiftUI + +struct FileListView: View { + var item: HotlineFile + + var body: some View { + List { + ForEach(item.files) { f in + if f.isFolder { + DisclosureGroup(f.name, isExpanded: false) + } + else { + Text("HELLO") + } + } + } + } +} + +#Preview { + FileListView(item: HotlineFile(type: "fldr", creator: "", fileSize: 0, fileName: "Folder")) +} |