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

The StackComponent has an optional shadow #4429

Merged
merged 4 commits into from
Oct 31, 2024
Merged

The StackComponent has an optional shadow #4429

merged 4 commits into from
Oct 31, 2024

Conversation

JayShortway
Copy link
Member

As the title says. I was initially going to build this just for the sticky footer, but I noticed on Figma that any stack can have a shadow, hence this PR.

Applied to the sticky footer, it looks like this:

Comment on lines +60 to +61
// Without compositingGroup(), the shadow is applied to the stack's children as well.
view.compositingGroup().shadow(shadow: shadow)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason for not adding compositingGroup() directly to the new shadow() modifier is that I wanted the latter to behave the same as the built-in one to avoid confusion. Let me know if you disagree!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL about compositingGroup() 😅

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same, actually 😄

Copy link
Member

@joshdholtz joshdholtz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks so good 😍

Comment on lines +60 to +61
// Without compositingGroup(), the shadow is applied to the stack's children as well.
view.compositingGroup().shadow(shadow: shadow)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL about compositingGroup() 😅

@JayShortway JayShortway merged commit 3dfd43e into main Oct 31, 2024
7 checks passed
@JayShortway JayShortway deleted the stack-shadow branch October 31, 2024 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants