Skip to content

Commit

Permalink
Make the X icon smaller
Browse files Browse the repository at this point in the history
  • Loading branch information
markmur committed Oct 20, 2023
1 parent 1cd3527 commit eb7c451
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Sources/ShopifyCheckout/CheckoutViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,16 @@ class CheckoutViewController: UIViewController, UIAdaptivePresentationController
private lazy var closeBarButtonItem: UIBarButtonItem = {
switch ShopifyCheckout.configuration.colorScheme {
case .web:

Check failure on line 47 in Sources/ShopifyCheckout/CheckoutViewController.swift

View workflow job for this annotation

GitHub Actions / lint

Switch and Case Statement Alignment Violation: Case statements should vertically aligned with their closing brace (switch_case_alignment)
return UIBarButtonItem(
barButtonSystemItem: .stop, target: self, action: #selector(close)
)
let closeIcon = UIImage(systemName: "xmark")?
.withConfiguration(UIImage.SymbolConfiguration(pointSize: 14, weight: .regular))
.withTintColor(.white, renderingMode: .alwaysOriginal)
let closeBarButtonItem = UIBarButtonItem(image: closeIcon, style: .plain, target: self, action: #selector(close))

Check failure on line 51 in Sources/ShopifyCheckout/CheckoutViewController.swift

View workflow job for this annotation

GitHub Actions / lint

Direct Return Violation: Directly return the expression instead of assigning it to a variable first (direct_return)
return closeBarButtonItem
default:

Check failure on line 53 in Sources/ShopifyCheckout/CheckoutViewController.swift

View workflow job for this annotation

GitHub Actions / lint

Switch and Case Statement Alignment Violation: Case statements should vertically aligned with their closing brace (switch_case_alignment)
return UIBarButtonItem(
let closeIcon = UIBarButtonItem(

Check failure on line 54 in Sources/ShopifyCheckout/CheckoutViewController.swift

View workflow job for this annotation

GitHub Actions / lint

Direct Return Violation: Directly return the expression instead of assigning it to a variable first (direct_return)
barButtonSystemItem: .close, target: self, action: #selector(close)
)
return closeIcon
}
}()

Expand Down

0 comments on commit eb7c451

Please sign in to comment.