From 8874683187e0de521f39c7cbebffa21b373484a6 Mon Sep 17 00:00:00 2001 From: Mike Moore Date: Thu, 26 Mar 2020 16:32:13 -0600 Subject: [PATCH 1/2] Better Default Colors With these changes the "placeholder" text color matches the color used in SwiftUI `TextField`s. Also, the text/background colors play nicer with Dark Mode. --- Sources/TextView/TextView.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Sources/TextView/TextView.swift b/Sources/TextView/TextView.swift index 5234cfd..67f6d45 100644 --- a/Sources/TextView/TextView.swift +++ b/Sources/TextView/TextView.swift @@ -148,9 +148,9 @@ public struct TextView: View { placeholderHorizontalPadding: CGFloat = 4.5, placeholderVerticalPadding: CGFloat = 7, font: UIFont = Self.defaultFont, - textColor: UIColor = .black, - placeholderColor: Color = .gray, - backgroundColor: UIColor = .white, + textColor: UIColor = .label, + placeholderColor: Color = Color(.placeholderText), + backgroundColor: UIColor = .clear, contentType: ContentType? = nil, autocorrection: Autocorrection = .default, autocapitalization: Autocapitalization = .sentences, From 0233e730e6abd659f6bde0dc2ece22ade6873041 Mon Sep 17 00:00:00 2001 From: Mike Moore Date: Thu, 26 Mar 2020 21:30:38 -0600 Subject: [PATCH 2/2] Incorporated PR feedback. --- Sources/TextView/TextView.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/TextView/TextView.swift b/Sources/TextView/TextView.swift index 67f6d45..68ce397 100644 --- a/Sources/TextView/TextView.swift +++ b/Sources/TextView/TextView.swift @@ -149,7 +149,7 @@ public struct TextView: View { placeholderVerticalPadding: CGFloat = 7, font: UIFont = Self.defaultFont, textColor: UIColor = .label, - placeholderColor: Color = Color(.placeholderText), + placeholderColor: Color = .init(.placeholderText), backgroundColor: UIColor = .clear, contentType: ContentType? = nil, autocorrection: Autocorrection = .default,