Skip to content

Commit

Permalink
Alternative Localized Text test
Browse files Browse the repository at this point in the history
  • Loading branch information
lkzhao committed Nov 16, 2022
1 parent c10a89e commit 1bd2c7b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Sources/UIComponent/Components/Layout/Other/Pager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ extension Pager {
guard !isUnbounded else {
let error = "Pager cannot be wrapped under an unlimited constraint component on its main axis. e.g. under a HStack or VStack"
assertionFailure(error)
return Text(error).textColor(.red).layout(constraint)
return Text(verbatim: error).textColor(.red).layout(constraint)
}
let pageMain = main(constraint.maxSize)
let childConstraint = Constraint(minSize: size(main: pageMain, cross: cross(constraint.minSize)),
Expand Down
4 changes: 2 additions & 2 deletions Sources/UIComponent/Components/View/Text.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public struct Text: ViewComponent {

@available(iOS 15, *)
public init(
localized: String.LocalizationValue,
_ localized: String.LocalizationValue,
font: UIFont = UIFont.systemFont(ofSize: UIFont.systemFontSize),
numberOfLines: Int = 0,
lineBreakMode: NSLineBreakMode = .byWordWrapping
Expand All @@ -31,7 +31,7 @@ public struct Text: ViewComponent {
}

public init(
_ text: String,
verbatim text: String,
font: UIFont = UIFont.systemFont(ofSize: UIFont.systemFontSize),
numberOfLines: Int = 0,
lineBreakMode: NSLineBreakMode = .byWordWrapping
Expand Down

0 comments on commit 1bd2c7b

Please sign in to comment.