Skip to content

Commit

Permalink
Default black stroke (#3222)
Browse files Browse the repository at this point in the history
* Default to black stroke color for borders

* Fix text field border width
  • Loading branch information
rlepinski authored Oct 3, 2024
1 parent 886b117 commit 39a4dac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Airship/AirshipCore/Source/BorderViewModifier.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ struct BorderViewModifier: ViewModifier {

@ViewBuilder
func body(content: Content) -> some View {
if let color = border.strokeColor?.toColor(colorScheme),
let width = border.strokeWidth
{
if let width = border.strokeWidth {
// Defaults to black to match Android & Web
let color = border.strokeColor?.toColor(colorScheme) ?? .black
if let cornerRadius = border.radius, cornerRadius > 0 {
content.overlay(
RoundedRectangle(
Expand Down
1 change: 1 addition & 0 deletions Airship/AirshipCore/Source/TextInput.swift
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ struct TextInput: View {
createTextEditor()
.id(self.model.identifier)
}
.padding(self.model.border?.strokeWidth ?? 0)
#if !os(watchOS)
.keyboardType(keyboardType)
#endif
Expand Down

0 comments on commit 39a4dac

Please sign in to comment.