@particle-academy/react-fancy 1.7.3 → 1.7.4

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.
package/dist/index.cjs CHANGED
@@ -8629,7 +8629,7 @@ function extensionEditorClasses(extensions) {
8629
8629
  ].join(" ");
8630
8630
  }).join(" ");
8631
8631
  }
8632
- function EditorContent({ className }) {
8632
+ function EditorContent({ className, maxHeight }) {
8633
8633
  const { contentRef, lineSpacing, placeholder, extensions, _initialHtml, _onInput } = useEditor();
8634
8634
  const initialized = react.useRef(false);
8635
8635
  react.useEffect(() => {
@@ -8652,10 +8652,14 @@ function EditorContent({ className }) {
8652
8652
  "data-react-fancy-editor-content": "",
8653
8653
  "data-placeholder": placeholder,
8654
8654
  onInput: _onInput,
8655
- style: { lineHeight: lineSpacing },
8655
+ style: {
8656
+ lineHeight: lineSpacing,
8657
+ maxHeight: maxHeight ? `${maxHeight}px` : void 0
8658
+ },
8656
8659
  className: cn(
8657
8660
  "min-h-[120px] px-4 py-3 text-sm outline-none",
8658
8661
  "focus:outline-none",
8662
+ maxHeight && "overflow-y-auto",
8659
8663
  proseClasses,
8660
8664
  extClasses,
8661
8665
  "empty:before:content-[attr(data-placeholder)] empty:before:text-zinc-400 empty:before:pointer-events-none",