testshallpass / react-native-dropdownalert

An alert to notify users about an error or something else
MIT License
1.86k stars 253 forks source link

Constant exports is breaking react-native-web #213

Closed BillyFigueroa closed 4 years ago

BillyFigueroa commented 5 years ago

Short Description

Constants being exporter in constants.js causing react-native-web to break

Errors...

Screen Shot 2019-09-11 at 11 16 43 PM

Steps to Reproduce / Code Snippets / Usage

Try to use DropdownAlert in a project with react-native-web

Expected Results

react-native-web projects should not crash

Additional Information

Solution

Change the constants.js from....

module.exports = {
  DEFAULT_IMAGE_DIMENSIONS,
  WINDOW,
  HEIGHT,
  WIDTH,
  IS_IOS,
  IS_ANDROID,
  IS_IOS_BELOW_11,
  TYPE,
  ACTION,
  getDefaultStatusBarStyle,
  getDefaultStatusBarBackgroundColor,
};

to this

export {
  DEFAULT_IMAGE_DIMENSIONS,
  WINDOW,
  HEIGHT,
  WIDTH,
  IS_IOS,
  IS_ANDROID,
  IS_IOS_BELOW_11,
  TYPE,
  ACTION,
  getDefaultStatusBarStyle,
  getDefaultStatusBarBackgroundColor,
};

fixes the issue

testshallpass commented 4 years ago

@BillyFigueroa This relates to #204 which has been fixed in 4.2.0.