react-native-hold-menu icon indicating copy to clipboard operation
react-native-hold-menu copied to clipboard

Add an ability to have custom preview

Open desfero opened this issue 2 years ago • 4 comments

This PR adds an ability to pass custom implementation of the preview component.

https://github.com/enesozturk/react-native-hold-menu/assets/7031578/ed8b603d-e9ae-4aca-af7d-e95633532678

TODO:

  • [ ] Cleanup the code
  • [ ] Document the changes
  • [ ] Understand the best way to have nice animation of reactions once it's hiding from the view.

desfero avatar Jun 23 '23 14:06 desfero

OHHH I LIKE THIS!! I was trying to add some kind of 'willOpen' property but it needs be synchronously awaited before calculating the size of the component

NoodleOfDeath avatar Jul 06 '23 17:07 NoodleOfDeath

Don't have time to fully finish this one in the short term future, if anyone wants to continue let me know.

desfero avatar Aug 07 '23 12:08 desfero

hi all, I just want to ask a question:

I saw the lib render {children} 2 times like this:

<GestureHandler>
        <Animated.View ref={containerRef} style={containerStyle}>
          {children} => HERE
        </Animated.View>
      </GestureHandler>

      <Portal key={key} name={key}>
        <Animated.View
          key={key}
          style={portalContainerStyle}
          animatedProps={animatedPortalProps}
        >
          <PortalOverlay />
          {children} => HERE
        </Animated.View>
      </Portal>

So does performance better?

fukemy avatar Aug 08 '23 02:08 fukemy