Sfoglia il codice sorgente

refactor: switch to using padding

Sam Jaffe 3 settimane fa
parent
commit
0ba63a82b1
1 ha cambiato i file con 6 aggiunte e 4 eliminazioni
  1. 6 4
      Todos/View/CategoryPanelView.swift

+ 6 - 4
Todos/View/CategoryPanelView.swift

@@ -14,13 +14,15 @@ struct CategoryPanelView: View {
   var body: some View {
     let style = Date.FormatStyle(date: .numeric, time: .standard)
     HStack {
-      Text("    ")
-      Text(item.name).font(.title)
+      Text(item.name)
+          .font(.title)
+          .padding(.leading, 10)
       Spacer()
       Button(action: addItem) {
         Image(systemName: "plus")
-      }.help("New Task")
-      Text("    ")
+      }
+        .help("New Task")
+        .padding(.trailing, 10)
     }
     Text("Created on \(item.timestamp, format: style)")
     List {