Deleted duplicated Modal

This commit is contained in:
Sadrinho27 2025-10-02 23:22:04 +02:00
parent 73d1d47cd1
commit df1e345748
2 changed files with 0 additions and 201 deletions

View File

@ -1,163 +0,0 @@
.modal-overlay {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
background: rgba(35, 36, 42, 0.82);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
animation: modal-fadein 0.33s cubic-bezier(.4, 0, .2, 1);
backdrop-filter: blur(3.5px);
-webkit-backdrop-filter: blur(3.5px);
}
@keyframes modal-fadein {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.modal-container {
background: #23242a;
border-radius: 18px;
min-width: 340px;
max-width: 95vw;
min-height: 0;
padding: 0 0 24px 0;
position: relative;
box-shadow: 0 12px 48px 0 rgba(0, 0, 0, 0.34), 0 2px 12px 0 rgba(30, 34, 44, 0.10);
overflow: hidden;
animation: modal-popin 0.34s cubic-bezier(.4, 0, .2, 1);
transition: box-shadow 0.2s, opacity 0.25s cubic-bezier(.4, 0, .2, 1);
}
.modal-container.modal-closing {
opacity: 0;
transform: translateY(32px) scale(0.97);
pointer-events: none;
}
@keyframes modal-popin {
from {
opacity: 0;
transform: translateY(32px) scale(0.97);
}
to {
opacity: 1;
transform: translateY(0) scale(1);
}
}
.modal-header {
background: linear-gradient(90deg, #23242a 85%, #23242aEE 100%);
color: #fff;
padding: 22px 30px 14px 30px;
border-radius: 18px 18px 0 0;
box-shadow: 0 2px 12px 0 rgba(30, 34, 44, 0.06);
position: relative;
display: flex;
align-items: center;
min-height: 52px;
}
.modal-header h2 {
margin: 0;
font-size: 1.3rem;
font-weight: 600;
letter-spacing: 0.01em;
color: #fff;
}
.modal-close {
position: absolute;
top: 10px;
right: 16px;
background: transparent;
border: none;
font-size: 2rem;
color: #e3e4e8;
width: 36px;
height: 36px;
min-width: 36px;
min-height: 36px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: background 0.18s, color 0.18s;
z-index: 2;
border-radius: 6px;
padding: 0;
}
.modal-close svg {
display: block;
width: 24px;
height: 24px;
background: none;
pointer-events: none;
}
.modal-close:hover,
.modal-close:focus {
background: rgba(255, 255, 255, 0.10);
color: #fff;
}
.modal-close:active {
background: rgba(67, 160, 71, 0.13);
}
.modal-close:active {
background: rgba(67, 160, 71, 0.13);
}
.modal-body {
padding: 28px 28px 0 28px;
max-height: 70vh;
overflow-y: auto;
color: #e3e4e8;
font-size: 1rem;
}
@media (max-width: 600px) {
.modal-container {
min-width: 0;
width: 98vw;
padding: 0 0 12px 0;
border-radius: 12px;
}
.modal-header {
padding: 16px 10px 10px 14px;
border-radius: 12px 12px 0 0;
}
.modal-body {
padding: 14px 8px 0 8px;
}
.modal-close {
top: 6px;
right: 6px;
width: 30px;
height: 30px;
font-size: 1.2rem;
}
}
.modal-body {
width: 100%;
}

View File

@ -1,38 +0,0 @@
import React, { memo } from 'react';
import './Modal.css';
interface ModalProps {
isOpen: boolean;
onClose: () => void;
title?: string;
children: React.ReactNode;
}
function Modal({ isOpen, onClose, title, children }: ModalProps) {
if (!isOpen) {
return null;
}
return (
<div className="modal-overlay modal-fadein">
<div className="modal-container modal-popin">
<button className="close-button modal-close" onClick={onClose} aria-label="Fermer">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
<path d="M6 6L18 18M18 6L6 18" stroke="#fff" strokeWidth="2.4" strokeLinecap="round" filter="url(#shadow)" />
<defs>
<filter id="shadow" x="-2" y="-2" width="28" height="28" filterUnits="userSpaceOnUse">
<feDropShadow dx="0" dy="0" stdDeviation="1.2" floodColor="#23242a" />
</filter>
</defs>
</svg>
</button>
{title && <div className="modal-header modal-header"><h2>{title}</h2></div>}
<div className="modal-body modal-body">
{children}
</div>
</div>
</div>
);
}
Modal.displayName = 'Modal';
export default memo(Modal);