Make editor title field padding consistent with body

This commit is contained in:
Matt Baer 2020-10-21 12:44:22 -04:00
parent 055caae5ab
commit d780be07c2

View File

@ -56,6 +56,7 @@ struct PostEditorView: View {
switch post.appearance {
case "sans":
TextField("Title (optional)", text: $post.title)
.padding(.horizontal, 4)
.font(.custom("OpenSans-Regular", size: 26, relativeTo: Font.TextStyle.largeTitle))
.onChange(of: post.title) { _ in
if post.status == PostStatus.published.rawValue && !updatingTitleFromServer {
@ -86,6 +87,7 @@ struct PostEditorView: View {
}
case "wrap", "mono", "code":
TextField("Title (optional)", text: $post.title)
.padding(.horizontal, 4)
.font(.custom("Hack", size: 26, relativeTo: Font.TextStyle.largeTitle))
.onChange(of: post.title) { _ in
if post.status == PostStatus.published.rawValue && !updatingTitleFromServer {
@ -116,6 +118,7 @@ struct PostEditorView: View {
}
default:
TextField("Title (optional)", text: $post.title)
.padding(.horizontal, 4)
.font(.custom("Lora", size: 26, relativeTo: Font.TextStyle.largeTitle))
.onChange(of: post.title) { _ in
if post.status == PostStatus.published.rawValue && !updatingTitleFromServer {