Skip to content

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.

},
});

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

3 participants