@@ -63,9 +63,10 @@ struct TodoEditorView: View {
6363 get: { viewModel. state. title } ,
6464 set: { viewModel. send ( . setTitle( $0) ) }
6565 ) ,
66- prompt: Text ( " 제목 " ) . foregroundColor ( Color . gray )
66+ prompt: Text ( " 제목(필수) " ) . foregroundColor ( Color . secondary ) ,
6767 )
68- . frame ( height: 22 )
68+ . font ( . title2)
69+ . frame ( height: 30 )
6970 . focused ( $field, equals: . title)
7071 . padding ( . horizontal)
7172 }
@@ -96,32 +97,58 @@ struct TodoEditorView: View {
9697 }
9798 }
9899 . padding ( . vertical, 10 )
99- . background ( Color ( UIColor . systemBackground) )
100+ . background ( Color ( . systemBackground) )
100101 }
101102 }
102103
103104 private var tabView : some View {
104105 Group {
105106 if viewModel. state. tabViewTag == . editor {
106- TextField (
107- " " ,
108- text: Binding (
109- get: { viewModel. state. content } ,
110- set: { viewModel. send ( . setContent( $0) ) }
111- ) ,
112- prompt: Text ( " 설명(선택 사항) " ) . font ( . callout) ,
113- axis: . vertical
114- )
115- . focused ( $field, equals: . description)
107+ VStack ( alignment: . leading, spacing: 8 ) {
108+ markdownHint
109+ TextField (
110+ " " ,
111+ text: Binding (
112+ get: { viewModel. state. content } ,
113+ set: { viewModel. send ( . setContent( $0) ) }
114+ ) ,
115+ prompt: Text ( " 설명(선택) " ) . foregroundColor ( Color . secondary) ,
116+ axis: . vertical
117+ )
118+ . font ( . callout)
119+ . focused ( $field, equals: . description)
120+ }
116121 } else {
117- Markdown ( viewModel. state. content)
118- . markdownTheme ( . basic)
122+ if viewModel. state. content. isEmpty {
123+ previewPlaceholder
124+ } else {
125+ Markdown ( viewModel. state. content)
126+ . markdownTheme ( . basic)
127+ }
119128 }
120129 }
121130 . padding ( . horizontal)
122131 . padding ( . top, 10 )
123132 }
124133
134+ private var markdownHint : some View {
135+ Text ( " Markdown 지원 · 예: # 제목, - 목록, **굵게** " )
136+ . font ( . caption)
137+ . foregroundStyle ( . secondary)
138+ }
139+
140+ private var previewPlaceholder : some View {
141+ VStack ( alignment: . leading, spacing: 6 ) {
142+ Text ( " Markdown 미리보기 " )
143+ . font ( . subheadline. weight ( . semibold) )
144+ Text ( " 편집 탭에서 Markdown으로 작성하면 여기에서 서식이 적용되어 보여요. " )
145+ . font ( . footnote)
146+ . foregroundStyle ( . secondary)
147+ }
148+ . frame ( maxWidth: . infinity, alignment: . leading)
149+ . padding ( . vertical, 8 )
150+ }
151+
125152 private var accessoryBar : some View {
126153 HStack {
127154 Button {
0 commit comments