Decathlon / vitamin-ios

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

feat(shadows): add shadow foundation #4

Closed daniel-dumortier closed 2 years ago

daniel-dumortier commented 2 years ago

Changes description

Here is a proposal for shadow implementatiion.

I had to do a little research because the snippet generated by Figma was irrelevant. Indeed, Figma uses notion of blur ans spread, which are not native for iOS.

I found some blog post about converting blur and spread from Sketch to iOS, and their method seems to work also for Figma.

I provided a quick README for shadows, and referenced this file in general README

Showcase

The Showcase has been updated, with an example of shadow dropped under a rounded rect label, with Background.accent color. But the shadow should be applicable to any UIView. Simulator Screen Shot - iPhone 12 Pro Max - 2022-01-10 at 10 19 01

Remarks

The color of the shadow is the same for dark and light themes (could not find in Figma if I should use a specific color for dark theme), thus, the shadow is quite invisible in dark theme over a black background.

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