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

AnimatedFAB should have a shadow at elevation level 3 #3805

Closed
ericpoulinnz opened this issue Apr 7, 2023 · 3 comments · Fixed by #3812
Closed

AnimatedFAB should have a shadow at elevation level 3 #3805

ericpoulinnz opened this issue Apr 7, 2023 · 3 comments · Fixed by #3812

Comments

@ericpoulinnz
Copy link

Current behaviour

When in M3, the shadow of the AnimateFAB is at level 6.

Expected behaviour

According to M3 spec, the FAB should have a shadow of level 3

Your Environment

software version
react-native 5.5.2
react-native-paper 0.71.6
expo sdk 48.0.0
@lukewalczak
Copy link
Member

Hey @ericpoulinnz, there is applied elevation level 3 in the AnimatedFAB when isV3:

  const md2Elevation = disabled || !isIOS ? 0 : 6;
  const md3Elevation = disabled || !isIOS ? 0 : 3;

  return (
    <Surface
		/ ... /
      style={[
        !isV3 && {
          elevation: md2Elevation,
        },
      ]}
      {...(isV3 && { elevation: md3Elevation })}
    >
		/ ... /

@ericpoulinnz
Copy link
Author

@lukewalczak I am using V3. It's in the styles that there is a problem.

/ ... /
  shadowWrapper: {
    elevation: 0,
  },
  shadow: {
    elevation: 6,
  },
/ ... /
});```

Changing the elevation there to 3 works.

@lukewalczak
Copy link
Member

Thanks @ericpoulinnz, I will double check it 👍🏽

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants