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

feat: support flat and elevated mode #3799

Merged
merged 2 commits into from
Apr 3, 2023
Merged

Conversation

lukewalczak
Copy link
Member

@lukewalczak lukewalczak commented Apr 3, 2023

Fixes: #3790

Summary

Related issue

Introducing prop mode to the Surface component with two possible options elevated (default) and flat.

The flat mode indicates the Surface component will have the background color appropriate to the set level, however, it will not have a shadow.

ios android web
Zrzut ekranu 2023-04-3 o 12 58 38 Zrzut ekranu 2023-04-3 o 12 57 27 Zrzut ekranu 2023-04-3 o 12 57 43

Test plan

New prop mode covered by unit tests.

@github-actions
Copy link

github-actions bot commented Apr 3, 2023

The mobile version of example app from this branch is ready! You can see it here.

@@ -39,6 +40,35 @@ describe('Surface', () => {
},
});

it('should render Surface with appropriate bg color but without shadow, if mode is set to "flat"', () => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

It would be nice to have a test with mode="elevated" too

Copy link
Collaborator

@tjaniczek tjaniczek left a comment

Choose a reason for hiding this comment

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

Tested on devices, LGTM

@lukewalczak lukewalczak merged commit 1c16deb into main Apr 3, 2023
@lukewalczak lukewalczak deleted the feat/add-mode-flat-surface branch April 3, 2023 14:21
teneeto pushed a commit that referenced this pull request May 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Disable shadows by default
2 participants