-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Expand file tree
/
Copy pathModal.jsx
More file actions
20 lines (20 loc) · 716 Bytes
/
Copy pathModal.jsx
File metadata and controls
20 lines (20 loc) · 716 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
export default function Modal({ onClose, children, maxWidth = '600px' }) {
return (
<div style={{
position: 'fixed', inset: 0, zIndex: 1000,
display: 'flex', alignItems: 'center', justifyContent: 'center',
background: 'var(--color-modal-backdrop)', backdropFilter: 'blur(4px)',
}} onClick={onClose}>
<div style={{
background: 'var(--color-bg-secondary)',
border: '1px solid var(--color-border-subtle)',
borderRadius: 'var(--radius-lg)',
maxWidth, width: '90%', maxHeight: '80vh',
display: 'flex', flexDirection: 'column',
overflow: 'auto',
}} onClick={e => e.stopPropagation()}>
{children}
</div>
</div>
)
}