Skip to content

Commit

Permalink
Add example of using container in ControlledBubbleMenu
Browse files Browse the repository at this point in the history
  • Loading branch information
sjdemartini committed Jun 23, 2023
1 parent 3dd99a3 commit 3f3b395
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/ControlledBubbleMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,20 @@ export type ControlledBubbleMenuProps = {
* (like the `ref` of a MUI <Dialog />), for instance, so that this bubble
* menu can still appear on top of that, without needing to use messy z-index
* overrides.
*
* Example:
*
* <Dialog open={open} ref={dialogRef}>
* <RichTextEditor ...>
* {() => (
* <>
* <MyControlledBubbleMenu container={dialogRef.current} />
* <LinkBubbleMenu container={dialogRef.current} />
* <TableBubbleMenu container={dialogRef.current} />
* </>
* )}
* </RichTextEditor>
* </Dialog>
*/
container?: PopperProps["container"];
/**
Expand Down

0 comments on commit 3f3b395

Please sign in to comment.