Skip to content

Commit bc0f0a1

Browse files
Merge pull request #33 from testimonialkit/develop
Fix comment view for ios 15
2 parents 0c0a515 + 372cce1 commit bc0f0a1

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ let package = Package(
1818
],
1919
dependencies: [
2020
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.3.0"),
21-
.package(url: "https://github.com/Charlyk/swift-theme-kit.git", from: "1.2.1"),
21+
.package(url: "https://github.com/Charlyk/swift-theme-kit.git", from: "1.2.2"),
2222
.package(url: "https://github.com/hmlongco/Factory.git", from: "2.5.3"),
2323
.package(url: "https://github.com/simibac/ConfettiSwiftUI.git", from: "2.0.3"),
2424
],

Sources/TestimonialKit/UI/Views/PromptCommentView.swift

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,14 @@ struct PromptCommentView: View {
3131
subtitle: strings.subtitle
3232
)
3333

34-
TextField(strings.placeholder, text: $comment, axis: .vertical)
35-
.applyThemeTextFieldStyle()
36-
.lineLimit(3...6)
34+
if #available(iOS 16.0, *) {
35+
TextField(strings.placeholder, text: $comment, axis: .vertical)
36+
.applyThemeTextFieldStyle()
37+
.lineLimit(3...6)
38+
} else {
39+
ThemedTextEditor(text: $comment, placeholder: strings.placeholder, minHeight: 100, maxHeight: 400)
40+
.applyThemeTextEditorStyle()
41+
}
3742

3843
VStack(spacing: 16) {
3944
/// Submit button that invokes `onSubmit` when tapped.

0 commit comments

Comments
 (0)