Skip to content

Commit

Permalink
Change spacing and font size of error text (#4415)
Browse files Browse the repository at this point in the history
## Summary
<!-- Simple summary of what was changed. -->
Error text now 11pt (caption2)
8px after form instead of 4
## Motivation
<!-- Why are you making this change? If it's for fixing a bug, if
possible, please include a code snippet or example project that
demonstrates the issue. -->
https://jira.corp.stripe.com/browse/MOBILESDK-2884
## Testing
<!-- How was the code tested? Be as specific as possible. -->

![test_UpdatePaymentMethodViewControllerExpiredCard@3x](https://github.com/user-attachments/assets/e4acb6f7-6f79-480e-a7b2-f28d713eefcc)

## Changelog
<!-- Is this a notable change that affects users? If so, add a line to
`CHANGELOG.md` and prefix the line with one of the following:
    - [Added] for new features.
    - [Changed] for changes in existing functionality.
    - [Deprecated] for soon-to-be removed features.
    - [Removed] for now removed features.
    - [Fixed] for any bug fixes.
    - [Security] in case of vulnerabilities.
-->
  • Loading branch information
joyceqin-stripe authored Dec 23, 2024
1 parent eabe9d2 commit a64e309
Show file tree
Hide file tree
Showing 11 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion StripeUICore/StripeUICore/Source/Elements/ElementsUI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import UIKit

public static func makeErrorLabel(theme: ElementsAppearance) -> UILabel {
let label = UILabel()
label.font = theme.fonts.footnote
label.font = theme.fonts.error
label.textColor = theme.colors.danger
label.numberOfLines = 0
label.setContentHuggingPriority(.required, for: .vertical)
Expand Down Expand Up @@ -100,6 +100,7 @@ import UIKit
withTextStyle: .caption1,
maximumPointSize: 20)
public var footnote = UIFont.preferredFont(forTextStyle: .footnote, weight: .regular, maximumPointSize: 20)
public var error = UIFont.preferredFont(forTextStyle: .caption2, weight: .regular)
public var smallFootnote = UIFont.preferredFont(forTextStyle: .caption2, weight: .medium)
public var footnoteEmphasis = UIFont.preferredFont(forTextStyle: .footnote, weight: .medium, maximumPointSize: 20)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ final class SectionView: UIView {
let stack = UIStackView(arrangedSubviews: [titleLabel, containerView, errorOrSubLabel])
stack.axis = .vertical
stack.spacing = 4
stack.setCustomSpacing(8, after: containerView)
addAndPinSubview(stack)

update(with: viewModel)
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 a64e309

Please sign in to comment.