Skip to content

Commit

Permalink
Left align text in mandate sheet
Browse files Browse the repository at this point in the history
  • Loading branch information
yuki-stripe committed Oct 18, 2023
1 parent f32f845 commit b66f19c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ class SepaMandateViewController: UIViewController, BottomSheetContentViewControl
navBar.delegate = self
return navBar
}()
private lazy var sepaMandateElement: SimpleMandateElement = {
private lazy var sepaMandateView: SimpleMandateTextView = {
let mandateText = String(format: String.Localized.sepa_mandate_text, configuration.merchantDisplayName)
return SimpleMandateElement(mandateText: mandateText, theme: configuration.appearance.asElementsTheme)
let view = SimpleMandateTextView(mandateText: mandateText, theme: configuration.appearance.asElementsTheme)
view.label.textAlignment = .left
return view
}()

private lazy var confirmButton: ConfirmButton = {
Expand Down Expand Up @@ -56,7 +58,7 @@ class SepaMandateViewController: UIViewController, BottomSheetContentViewControl
override func viewDidLoad() {
super.viewDidLoad()
view.backgroundColor = configuration.appearance.colors.background
let stackView = UIStackView(arrangedSubviews: [headerLabel, sepaMandateElement.view, confirmButton])
let stackView = UIStackView(arrangedSubviews: [headerLabel, sepaMandateView, confirmButton])
stackView.axis = .vertical
stackView.spacing = PaymentSheetUI.defaultPadding

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ...epaMandateViewControllerSnapshotTest/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b66f19c

Please sign in to comment.