88import SwiftUI
99
1010struct TodoInfoSheetView : View {
11+ let createdAt : Date
12+ let completedAt : Date ?
1113 let dueDate : Date ?
1214 let tags : [ String ]
1315 let onClose : ( ) -> Void
@@ -16,13 +18,28 @@ struct TodoInfoSheetView: View {
1618 NavigationStack {
1719 ScrollView {
1820 LazyVStack ( spacing: 32 ) {
19- VStack {
20- HStack {
21- Text ( " 마감일 " )
22- . font ( . subheadline)
23- . foregroundStyle ( . secondary)
21+ VStack ( alignment: . leading) {
22+ Text ( " 생성일 " )
23+ . font ( . subheadline)
24+ . foregroundStyle ( . secondary)
25+ HStack ( spacing: 8 ) {
26+ Image ( systemName: " calendar " )
27+ . foregroundStyle ( . white)
28+ Text ( createdAt. formatted ( date: . abbreviated, time: . omitted) )
2429 Spacer ( )
2530 }
31+ . padding ( . vertical, 10 )
32+ . padding ( . horizontal, 12 )
33+ . background (
34+ RoundedRectangle ( cornerRadius: 12 )
35+ . fill ( . blue)
36+ )
37+ Divider ( )
38+ }
39+ VStack ( alignment: . leading) {
40+ Text ( " 마감일 " )
41+ . font ( . subheadline)
42+ . foregroundStyle ( . secondary)
2643 HStack ( spacing: 8 ) {
2744 Image ( systemName: " calendar " )
2845 . foregroundStyle ( . secondary)
@@ -42,13 +59,33 @@ struct TodoInfoSheetView: View {
4259 )
4360 Divider ( )
4461 }
45- VStack {
46- HStack {
47- Text ( " 태그 " )
48- . font ( . subheadline)
62+ VStack ( alignment: . leading) {
63+ Text ( " 완료 시점 " )
64+ . font ( . subheadline)
65+ . foregroundStyle ( . secondary)
66+ HStack ( spacing: 8 ) {
67+ Image ( systemName: " calendar " )
4968 . foregroundStyle ( . secondary)
69+ Text (
70+ completedAt?
71+ . formatted ( date: . abbreviated, time: . omitted)
72+ ?? " 완료하지 않음 "
73+ )
74+ . foregroundStyle ( . white)
5075 Spacer ( )
5176 }
77+ . padding ( . vertical, 10 )
78+ . padding ( . horizontal, 12 )
79+ . background (
80+ RoundedRectangle ( cornerRadius: 12 )
81+ . fill ( . green)
82+ )
83+ Divider ( )
84+ }
85+ VStack ( alignment: . leading) {
86+ Text ( " 태그 " )
87+ . font ( . subheadline)
88+ . foregroundStyle ( . secondary)
5289 Divider ( )
5390 if !tags. isEmpty {
5491 TagLayout {
0 commit comments