feat(react): port markdown_import partially

This commit is contained in:
Elian Doran
2025-08-03 17:23:47 +03:00
parent 4b1fd5e4a0
commit 77818d5453
3 changed files with 90 additions and 107 deletions

View File

@@ -7,10 +7,11 @@ interface ModalProps {
title: string;
size: "lg" | "sm";
children: ComponentChildren;
footer?: ComponentChildren;
onShown?: () => void;
}
export default function Modal({ children, className, size, title, onShown }: ModalProps) {
export default function Modal({ children, className, size, title, footer, onShown }: ModalProps) {
const modalRef = useRef<HTMLDivElement>(null);
if (onShown) {
@@ -34,6 +35,12 @@ export default function Modal({ children, className, size, title, onShown }: Mod
<div className="modal-body">
{children}
</div>
{footer && (
<div className="modal-footer">
{footer}
</div>
)}
</div>
</div>
</div>