Skip to content

Commit

Permalink
Configuration for highlighted composer border color
Browse files Browse the repository at this point in the history
  • Loading branch information
martinmitrevski committed Dec 26, 2023
1 parent af56120 commit 0861a1d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ public struct ComposerInputView<Factory: ViewFactory>: View, KeyboardReadable {
.background(composerInputBackground)
.overlay(
RoundedRectangle(cornerRadius: TextSizeConstants.cornerRadius)
.stroke(Color(keyboardShown ? colors.composerInputHighlightedBorder : colors.innerBorder))
.stroke(Color(keyboardShown ? highlightedBorder : colors.innerBorder))
)
.clipShape(
RoundedRectangle(cornerRadius: TextSizeConstants.cornerRadius)
Expand All @@ -403,6 +403,11 @@ public struct ComposerInputView<Factory: ViewFactory>: View, KeyboardReadable {
var colors = colors
return Color(colors.composerInputBackground)
}

private var highlightedBorder: UIColor {
var colors = colors
return colors.composerInputHighlightedBorder
}

private var shouldAddVerticalPadding: Bool {
!addedFileURLs.isEmpty || !addedAssets.isEmpty
Expand Down
2 changes: 1 addition & 1 deletion Sources/StreamChatSwiftUI/ColorPalette.swift
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public struct ColorPalette {

public lazy var composerPlaceholderColor: UIColor = subtitleText
public lazy var composerInputBackground: UIColor = background
public var composerInputHighlightedBorder: UIColor = .streamInnerBorder
public lazy var composerInputHighlightedBorder: UIColor = innerBorder
}

// Those colors are default defined stream constants, which are fallback values if you don't implement your color theme.
Expand Down

0 comments on commit 0861a1d

Please sign in to comment.