pedreviljoen / react-native-menu

Simple & lightweight customisable menu drawer component
MIT License
57 stars 16 forks source link

index.js can't find variable: DRAWER_WIDTH error #23

Closed muratboyraz closed 5 years ago

muratboyraz commented 5 years ago

Hi, I was just trying this example https://reactnativeexample.com/simple-lightweight-customisable-menu-drawer-component/ and there was an error in index.js file which you may forgot to declare DRAWER_WIDTH value.

pedreviljoen commented 5 years ago

@muratboyraz Will have a look 👍

pedreviljoen commented 5 years ago

Did you pass the drawer percentage through as a prop? It is a percentage value between 0 and 100.

muratboyraz commented 5 years ago

Did you pass the drawer percentage through as a prop? It is a percentage value between 0 and 100.

yes i did, but i got same error. I inspected your code and i add DRAWER_WIDTH as a global variable, after that time it compiled but result looks like this. drawer_width

pedreviljoen commented 5 years ago

Updated to accommodate. You can upgrade your dependency to match latest version & re-install 👍🏼

pedreviljoen commented 5 years ago

@muratboyraz updated with a fix. Please update to latest package dependency and try again :)