File tree Expand file tree Collapse file tree 4 files changed +10
-2
lines changed
Sources/StreamChatSwiftUI Expand file tree Collapse file tree 4 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
7
7
- Possibility to customize message reactions top padding (for grid-based reaction containers)
8
8
- Custom sorting of reactions
9
9
- Added a configurable separator view for new messages
10
+ - Possibility to customize the cornerRadius of the ` ComposerInputView `
10
11
11
12
# [ 4.26.0] ( https://github.com/GetStream/stream-chat-swiftui/releases/tag/4.26.0 )
12
13
_ January 16, 2023_
Original file line number Diff line number Diff line change @@ -9,19 +9,22 @@ public struct ComposerConfig {
9
9
10
10
public var inputViewMinHeight : CGFloat
11
11
public var inputViewMaxHeight : CGFloat
12
+ public var inputViewCornerRadius : CGFloat
12
13
public var inputFont : UIFont
13
14
public var adjustMessageOnSend : ( String ) -> ( String )
14
15
public var adjustMessageOnRead : ( String ) -> ( String )
15
16
16
17
public init (
17
18
inputViewMinHeight: CGFloat = 38 ,
18
19
inputViewMaxHeight: CGFloat = 76 ,
20
+ inputViewCornerRadius: CGFloat = 20 ,
19
21
inputFont: UIFont = UIFont . preferredFont ( forTextStyle: . body) ,
20
22
adjustMessageOnSend: @escaping ( String ) -> ( String ) = { $0 } ,
21
23
adjustMessageOnRead: @escaping ( String ) -> ( String ) = { $0 }
22
24
) {
23
25
self . inputViewMinHeight = inputViewMinHeight
24
26
self . inputViewMaxHeight = inputViewMaxHeight
27
+ self . inputViewCornerRadius = inputViewCornerRadius
25
28
self . inputFont = inputFont
26
29
self . adjustMessageOnSend = adjustMessageOnSend
27
30
self . adjustMessageOnRead = adjustMessageOnRead
Original file line number Diff line number Diff line change @@ -343,11 +343,11 @@ public struct ComposerInputView<Factory: ViewFactory>: View {
343
343
. padding ( . leading, 8 )
344
344
. background ( composerInputBackground)
345
345
. overlay (
346
- RoundedRectangle ( cornerRadius: 20 )
346
+ RoundedRectangle ( cornerRadius: TextSizeConstants . cornerRadius )
347
347
. stroke ( Color ( colors. innerBorder) )
348
348
)
349
349
. clipShape (
350
- RoundedRectangle ( cornerRadius: 20 )
350
+ RoundedRectangle ( cornerRadius: TextSizeConstants . cornerRadius )
351
351
)
352
352
. accessibilityIdentifier ( " ComposerInputView " )
353
353
}
Original file line number Diff line number Diff line change @@ -18,6 +18,10 @@ struct TextSizeConstants {
18
18
static var minThreshold : CGFloat {
19
19
composerConfig. inputViewMinHeight
20
20
}
21
+
22
+ static var cornerRadius : CGFloat {
23
+ composerConfig. inputViewCornerRadius
24
+ }
21
25
}
22
26
23
27
class InputTextView : UITextView , AccessibilityView {
You can’t perform that action at this time.
0 commit comments