Skip to content
Discussion options

You must be logged in to vote

If you need to close the inbox programatically, you'll need to take over control over the isOpen prop. The approach depends a bit on what SDK you're using.

@magicbell/magicbell-react

When using react, you'll need to control the isOpen prop. The exact implementation depends very much on your requirements, but here's the basic approach.

function MyApp() {
  const { showInbox } = useContext(AppContext);

  return (
    <MagicBell apiKey={apiKey} userEmail="[email protected]">
      {(props) => (
        <FloatingNotificationInbox {…props} isOpen={showInbox} />
      )}
    </MagicBell>
  );
}

@magicbell/embeddable

The embeddable currently doesn't expose a way to take over control. You could…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by 3v0k4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Questions
Labels
None yet
2 participants