Conversation
|
Thanks @lanc33llis! I'll get this in along with fixing nativewind in an update soon. And what event handlers are missing from I've been deep in a web project and working on legend-state for a while, but I'm coming back to focusing more on our mobile app now so it's a great time to make some improvements here :) |
|
Ah my apologies! I misread https://github.com/LegendApp/legend-motion/blob/main/src/MotionPressable.tsx, thought the event handlers for pressing/clicks were omitted from the props types so that's all good. Being able to pass functions to animate and such is unnecessary then. Still may want to expose this context though, might be useful in some custom behavior. On the note of making improvements, variants would be awesome! This doesn't seem be very difficult besides possibly propagation to child components like motion-framer does. Depending on your timeline for features, I could be able to create a PR for that since that would suit my use cases as well. |
We should expose
PressableContextso that more complex behavior is possible particularly for child components. This is important because currently the library does not support functions foranimate,whileHover, etc. and removes important event handlers fromPressablemaking it basically impossible for developers to handle state