mirror of
https://github.com/jlengrand/Maestro.git
synced 2026-03-10 08:31:19 +00:00
fix(save-markdown-modal): use createPortal to render at document body
Fixes overlay not covering sidebar and file panel by rendering the modal via React portal to document.body, ensuring proper z-index stacking across all UI layers.
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
*/
|
||||
|
||||
import React, { useState, useRef, useEffect } from 'react';
|
||||
import { createPortal } from 'react-dom';
|
||||
import { FolderOpen } from 'lucide-react';
|
||||
import type { Theme } from '../types';
|
||||
import { Modal, ModalFooter } from './ui/Modal';
|
||||
@@ -99,7 +100,7 @@ export function SaveMarkdownModal({
|
||||
|
||||
const isValid = folder.trim() && filename.trim();
|
||||
|
||||
return (
|
||||
return createPortal(
|
||||
<Modal
|
||||
theme={theme}
|
||||
title="Save Markdown"
|
||||
@@ -195,7 +196,8 @@ export function SaveMarkdownModal({
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
</Modal>
|
||||
</Modal>,
|
||||
document.body
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user