@crystallize/design-system 1.11.3 → 1.11.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,6 +7,7 @@
7
7
  *
8
8
  */
9
9
 
10
+ import { useRef } from 'react';
10
11
  import { CLEAR_EDITOR_COMMAND, LexicalEditor } from 'lexical';
11
12
  import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
12
13
 
@@ -34,11 +35,12 @@ export default function ActionsPlugin({
34
35
  }): JSX.Element {
35
36
  const [editor] = useLexicalComposerContext();
36
37
  const tr = useTr();
38
+ const actionMenuAnchorRef = useRef<HTMLDivElement>(null);
37
39
 
38
40
  return (
39
- <div className="z-50 flex items-center ">
41
+ <div ref={actionMenuAnchorRef} className="z-50 flex items-center ">
40
42
  <div></div>
41
- <ActionMenu>
43
+ <ActionMenu container={actionMenuAnchorRef.current}>
42
44
  {!prepend
43
45
  ? null
44
46
  : prepend.map(actionItem => (
@@ -4,7 +4,7 @@ import userEvent from '@testing-library/user-event';
4
4
  import { RichTextEditor } from '../rich-text-editor';
5
5
 
6
6
  describe('RichTextEditor code node', () => {
7
- it('can add a code block to an existing paragraph texst', async () => {
7
+ it('can add a code block to an existing paragraph text', async () => {
8
8
  const onChange = vi.fn();
9
9
 
10
10
  render(