Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow configuration of showing country flags #1556

Merged
merged 6 commits into from
Mar 20, 2024

Conversation

goergisn
Copy link
Contributor

@goergisn goergisn commented Mar 19, 2024

Summary

In the country/region picker for the payment form, you can now choose if the images of flags are shown.

Components

let cardConfiguration = CardComponent.Configuration()
cardConfiguration.style.addressStyle.showCountryFlags = true/false
let cardComponent = CardComponent(paymentMethod: paymentMethod,
                                  context: context,
                                  configuration: cardConfiguration)

Drop-In

var style = DropInComponent.Style()
style.formComponent.addressStyle.showCountryFlags = cardSettings.showsCountryFlags
let dropInConfiguration = DropInComponent.Configuration(style: style)
let dropInComponent = DropInComponent(paymentMethods: paymentMethods,
                                      context: context,
                                      configuration: dropInConfiguration)

Also

  • Adds a configuration to show/hide the flags in the Demo app
  • Adds tests for flag visibility
List (showing flags) Settings (enabled)
List (no flags) Settings (disabled)

@goergisn goergisn added the new a pull request that adds a new feature label Mar 19, 2024
github-actions[bot]
github-actions bot previously approved these changes Mar 19, 2024
atmamont
atmamont previously approved these changes Mar 19, 2024
erenbesel
erenbesel previously approved these changes Mar 19, 2024
@neelSharma12
Copy link
Contributor

You need to add PR description with new tag as this is a new addition.

Copy link

@goergisn goergisn merged commit 5f425a5 into develop Mar 20, 2024
12 checks passed
@goergisn goergisn deleted the feature/style_country_flags branch March 20, 2024 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new a pull request that adds a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants