Files
goldenChart/frontend/src/components/DraggableModalFrame.tsx
T
Macbook eaf067db1c Unify popup UI to TradeAlertModal design system.
Add AppPopup shell, shared CSS, MUI theme overrides, and center positioning for consistent modal styling across frontend and frontend_golden.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-23 16:56:37 +09:00

53 lines
1.1 KiB
TypeScript

/**
* 드래그 가능한 모달 프레임 — AppPopup 기반
*/
import React from 'react';
import AppPopup from './AppPopup';
export interface DraggableModalFrameProps {
onClose: () => void;
title: React.ReactNode;
titleKo?: React.ReactNode;
badge?: string;
children: React.ReactNode;
overlayClassName?: string;
dialogClassName?: string;
bodyClassName?: string;
zIndex?: number;
width?: number | string;
closeOnBackdrop?: boolean;
}
export const DraggableModalFrame: React.FC<DraggableModalFrameProps> = ({
onClose,
title,
titleKo,
badge,
children,
overlayClassName = 'sp-modal-overlay',
dialogClassName = 'sp-modal',
bodyClassName = 'sp-modal-body app-popup-body',
zIndex = 1000,
width,
closeOnBackdrop = true,
}) => (
<AppPopup
onClose={onClose}
title={title}
titleKo={titleKo}
badge={badge}
overlayClassName={overlayClassName}
shellClassName={dialogClassName}
bodyClassName={bodyClassName}
zIndex={zIndex}
width={width ?? 420}
backdrop
closeOnBackdrop={closeOnBackdrop}
centered
>
{children}
</AppPopup>
);
export default DraggableModalFrame;