feat(editor): render Bubble Menu Default when there's no children#3226
feat(editor): render Bubble Menu Default when there's no children#3226gabrielmfern merged 11 commits intocanaryfrom
Conversation
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
commit: |
joaopcm
left a comment
There was a problem hiding this comment.
Also, what do you think of BubbleMenu instead of BubbleMenu.Root? Having .Root feels like I'm composing something, which is not aligned with having a default structure for a component when no children is passed
Summary by cubic
Make
<BubbleMenu>the root component that renders the default text formatting toolbar when used without children, and removeBubbleMenu.Default. Updates docs, examples, tests, and bumps@react-email/editorto 0.0.0-experimental.47.Refactors
<BubbleMenu>to the root container; it auto-renders the default menu when no children are provided.BubbleMenu.Default; delete its exports/tests and add tests for<BubbleMenu>’s default behavior.<BubbleMenu>; link/image/button menus are nowBubbleMenu.LinkDefault,BubbleMenu.ButtonDefault,BubbleMenu.ImageDefault.hideWhenActiveNodes,hideWhenActiveMarks,placement,offset, andonHideon<BubbleMenu>.Migration
<BubbleMenu.Default />and<BubbleMenu.Root />with<BubbleMenu />.excludeItemsprop is removed; to customize, pass children to<BubbleMenu>using the provided primitives (e.g., Bold, Italic, NodeSelector, LinkSelector, alignment items).Written for commit 0a15ee4. Summary will update on new commits.