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

Open drawer shadow #363

Open
MSSPL-PiyaleeMaiti opened this issue Jul 10, 2018 · 1 comment
Open

Open drawer shadow #363

MSSPL-PiyaleeMaiti opened this issue Jul 10, 2018 · 1 comment

Comments

@MSSPL-PiyaleeMaiti
Copy link

I use the below style for shadow when I open the drawer.

const drawerStyles = {
      drawer: { shadowColor: '#000000', shadowOpacity: 0.1, shadowRadius: 3},
      main  : {paddingLeft : 0, backgroundColor:'#000000'},
    };
<Drawer
          type               = "static"
          content            = {<DrawerContent />}
          styles             = {drawerStyles}
          tapToClose         = {true}
          openDrawerOffset   = {0.15} // 15% gap on the right side of drawer
          panCloseMask       = {0.2}
          closedDrawerOffset = {0}
          tweenDuration      = {500}
          tweenEasing        = "easeInOutQuad"
          initializeOpen     = {false}
          ref                = {(ref) => this._drawer = ref}
          tweenHandler       = {Drawer.tweenPresets.parallax}
          onOpen             = {() => this._onOpenDrawer()}
          onClose            = {() => {}}>
          <MainContent />
    </Drawer>

But it's not working on android and ios both platform. Can anyone suggest any solution for shadow implementation?
I want the shadow when I open the drawer then the main content will be shown in shadow. When drawer close the shadow will be gone.

@Carlosarturo28
Copy link

For Android use elevation={2} As said in the Docs:

elevation (Number) 0 - (Android-only) Sets the elevation of the drawer using Android's underlying elevation API

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

No branches or pull requests

2 participants