Expose @faceless-ui/modal for plugin builders #4820
Utzel-Butzel
started this conversation in
Feature Requests & Ideas
Replies: 1 comment 1 reply
-
Hey @Utzel-Butzel I know exactly what you're talking about here and you're spot on regarding duplicative contexts. In Payload 3.0, we're splitting all of our UI components into a new |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When building a plugin which uses the
Drawer
component frompayload/components/elements
,I can control it via theDrawerToggler
(also frompayload/components/elements
).To build my own custom
DrawerToggler
I want to useimport { useModal } from '@faceless-ui/modal'
directly, but since it is getting imported directly from inside my pluginuseModule
does not get access to the original react context from the payload library.If I understood correctly it is not simply possible to access the context from two libraries (https://stackoverflow.com/questions/70076361/how-to-share-context-between-multiple-libraries)
Would it be possible (and useful) to expose
useModal
from payload, so I can use it inside payloads react context and would you like a PR on that?Simplified example of my code:
Beta Was this translation helpful? Give feedback.
All reactions