Decathlon / vitamin-ios

Decathlon Design System UI components for iOS & iPadOS applications
https://www.decathlon.design
Apache License 2.0
48 stars 14 forks source link

feat(button): add icon alone UIKit VitaminButton type, and refactor icon management #75

Closed daniel-dumortier closed 2 years ago

daniel-dumortier commented 2 years ago

Changes description

I added the ability to define a 'icon Alone' version of VitaminButton. I also reworked the way to specify which type of icon you want (for already existing trailing and leading icons) And I took advantage of this PR to change icon size on large and medium button (see #74)

Context

Checklist

Does this introduce a breaking change?

Screenshots

iPhone

Simulator Screen Shot - iPhone 8 - 2022-07-22 at 17 43 28 Simulator Screen Shot - iPhone 8 - 2022-07-22 at 17 43 47

iPad

Simulator Screen Shot - iPad (9th generation) - 2022-07-22 at 17 55 30 Simulator Screen Shot - iPad (9th generation) - 2022-07-22 at 17 56 01

Other information

I am not sure it is Vitamin compliant, but I reworked the code to give the ability to have different icons for different states (that was allowed before by the previous code, but did not work well)

Sabrinavigil commented 2 years ago

👍

sonarcloud[bot] commented 2 years ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

daniel-dumortier commented 2 years ago

Some problems have been detected on existing buttons, but since they are already released, I just opened a new issue #77 and merge this feature.