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: add badge component #54

Closed daniel-dumortier closed 2 years ago

daniel-dumortier commented 2 years ago

Changes description

Implementation of the Badge component

Context

This PR solves the issue #17

Checklist

Does this introduce a breaking change?

Screenshots

iPhone

badges-vitamin

iPad

badges-vitamin-ipad

Other information

I decided to provide the component itself, but also an extension on UIView to be able to add it to any view, and to place it at the right place automatically (on the upper right corner) The showcase demonstrates both usages

daniel-dumortier commented 2 years ago

Just a quick remark : for the moment, the PR still uses the discount color, will fix it when #55 will be merged

lauthieb commented 2 years ago

Thanks @daniel-dumortier, feel free to fix conflicts :)

daniel-dumortier commented 2 years ago

@lauthieb I'll do that quickly. Conflicts have just appeared because I merged other PRs on main, and project.pbxproj is a file where all project files are listed, so it is always in conflict if you add two different files in two branches, even if they are not related ;)

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