txtodo

[DORMANT] a minimalist todo list app inspired by jeff huang
git clone git://git.figbert.com/txtodo.git
Log | Files | Refs | README

NoteSheet.swift (759B)


      1 //
      2 //  NoteSheet.swift
      3 //  txtodo
      4 //
      5 //  Created by FIGBERT on 8/5/20.
      6 //
      7 
      8 import SwiftUI
      9 
     10 struct NoteSheet: View {
     11     @Environment(\.managedObjectContext) var managedObjectContext
     12     @ObservedObject var task: Task
     13     
     14     var body: some View {
     15         ScrollView(.vertical, showsIndicators: false) {
     16             VStack(spacing: 10) {
     17                 Text(task.name)
     18                     .underline()
     19                 ForEach(task.notes, id: \.self) { note in
     20                     NoteView(task: task, note: note, config: NoteViewConfig(editingCache: note))
     21                         .environment(\.managedObjectContext, self.managedObjectContext)
     22                 }
     23                 AddNoteView(task: task)
     24             }
     25         }
     26             .padding()
     27     }
     28 }