Skip to content

Commit

Permalink
Merge pull request #722 from kiwicom/714-choicetile-content-is-not-up…
Browse files Browse the repository at this point in the history
…dated-properly

Remove basic Equatable conformance from Text
  • Loading branch information
PavelHolec authored Nov 21, 2023
2 parents 98b7247 + b2ac642 commit 672657f
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions Sources/Orbit/Components/Text.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@ public struct Text: View, FormattedTextBuildable, PotentiallyEmptyView {
var isMonospacedDigit: Bool?
var lineHeight: CGFloat?

var isEmpty: Bool {
content.isEmpty
}

// The Orbit Text consists of up to 3 layers:
//
// 1) SwiftUI.Text base layer, either:
Expand Down Expand Up @@ -73,6 +69,10 @@ public struct Text: View, FormattedTextBuildable, PotentiallyEmptyView {
)
}
}

var isEmpty: Bool {
content.isEmpty
}

func text(textRepresentableEnvironment: TextRepresentableEnvironment, isConcatenated: Bool = false) -> SwiftUI.Text {
if content.containsHtmlFormatting {
Expand Down Expand Up @@ -335,14 +335,6 @@ extension Text: TextRepresentable {
}
}

// MARK: - Equatable
extension Text: Equatable {

public static func == (lhs: Text, rhs: Text) -> Bool {
lhs.content == rhs.content
}
}

// MARK: - Previews
struct TextPreviews: PreviewProvider {

Expand Down

0 comments on commit 672657f

Please sign in to comment.