// MOMO Pro - Modal & 命令面板 // ===== 通用 Modal 容器 ===== const Modal = ({ open, onClose, title, children, footer, size = 'md' }) => { if (!open) return null; const widths = { sm: 480, md: 640, lg: 880 }; return (
e.stopPropagation()} style={{ background: 'var(--momo-bg-surface)', borderRadius: 'var(--momo-radius-lg)', boxShadow: 'var(--momo-shadow-lg)', width: '100%', maxWidth: widths[size], maxHeight: '90%', display: 'flex', flexDirection: 'column', overflow: 'hidden', animation: 'momo-slide-up 0.2s ease-out', }}>

{title}

{children}
{footer && (
{footer}
)}
); }; // ===== 編輯商品 Modal ===== const ProductEditModal = ({ open, product, onClose, buttonStyle = 'gradient' }) => { if (!product) return null; const Field = ({ label, children, hint }) => (
{children} {hint &&
{hint}
}
); const fieldStyle = { width: '100%', padding: '8px 12px', border: '1px solid var(--momo-border)', borderRadius: 'var(--momo-radius-md)', fontSize: 13, outline: 'none', background: 'var(--momo-bg-surface)', transition: 'var(--momo-transition-base)', }; return ( }>