Git Product home page Git Product logo

react-native-unicorn-modals's People

Contributors

bezenson avatar vladislavkovaliov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

react-native-unicorn-modals's Issues

goog color

Hi! ๐Ÿ‘‹

Firstly, thanks for your work on this project! ๐Ÿ™‚

Today I used patch-package to patch [email protected] for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-unicorn-modals/src/themes/default-dark.ts b/node_modules/react-native-unicorn-modals/src/themes/default-dark.ts
index 4b8df4a..6a5f3c0 100644
--- a/node_modules/react-native-unicorn-modals/src/themes/default-dark.ts
+++ b/node_modules/react-native-unicorn-modals/src/themes/default-dark.ts
@@ -8,7 +8,7 @@ const defaultThemeDark: DefaultTheme = {
   },
   cardBackgroundColor: '#111',
   lineColor: '#222',
-  overlayBackgroundColor: 'rgba(0, 0, 0, 0.8)',
+  overlayBackgroundColor: '#0008',
   textColor: '#ddd',
   titleTextColor: '#fff',
 };
diff --git a/node_modules/react-native-unicorn-modals/src/themes/default-light.ts b/node_modules/react-native-unicorn-modals/src/themes/default-light.ts
index 4c5f21e..7aff425 100644
--- a/node_modules/react-native-unicorn-modals/src/themes/default-light.ts
+++ b/node_modules/react-native-unicorn-modals/src/themes/default-light.ts
@@ -8,7 +8,7 @@ const defaultThemeLight: DefaultTheme = {
   },
   cardBackgroundColor: '#eee',
   lineColor: '#ddd',
-  overlayBackgroundColor: 'rgba(0, 0, 0, 0.8)',
+  overlayBackgroundColor: '#0008',
   textColor: '#333',
   titleTextColor: '#000',
 };

This issue body was partially generated by patch-package.

Reanimated 3 update?

Hi @inferusvv , as I can see, the lib depends on Reanimated 2, which may not have compatibility with newer React Native versions. Are there plans to update it?

Menu item `onPress` handlers not invoked

Hi there! First of all, bravo for the library ๐Ÿ˜ Definitely the best of the kind I've found so far both in terms of appearance and API design.

There's a small bug in v0.5.0: in the code to open a menu:

modal.show(
  'menu',
  {
    items: [
      { text: 'Default variant', onPress: () => {} },
      { text: 'Cancel variant', variant: 'cancel', onPress: () => {} },
      { text: 'Destructive variant', variant: 'destructive', onPress: () => {} },
    ],
  },
);

None of these onPress callbacks get called. I looked into the source code and was able to fix it by changing a line in Menu.tsx:

<MenuItem key={item.text} onPress={createActionCallback()} theme={theme} variant={item.variant}>

to

<MenuItem key={item.text} onPress={createActionCallback(item.onPress)} theme={theme} variant={item.variant}>

Just posting it here so you guys can fix it upstream. Thanks for the work! ๐Ÿ‘

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.