/
h0tnanny
/
IotPlatform
Обзор
Документация
Войти
/
h0tnanny
/
IotPlatform
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
develop
client/src/components/Modal/Modal.module.scss
174 строки
3 KB
h0tnanny
fix alert
26 янв 2026, 22:20
26 янв 2026, 22:20
651a591
Код
Авторство
О чём код?
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } } @keyframes slideIn { from { opacity: 0; transform: translate(-50%, -60%); } to { opacity: 1; transform: translate(-50%, -50%); } } .overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 10000; animation: fadeIn 0.2s ease-out; } .modal { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: var(--bg-primary); border: 1px solid var(--border-color); border-radius: 12px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3); padding: 2rem; min-width: 400px; max-width: 500px; max-height: 90vh; overflow-y: auto; animation: slideIn 0.3s ease-out; @media (max-width: 768px) { min-width: auto; width: 90%; padding: 1.5rem; } } .closeBtn { position: absolute; top: 1rem; right: 1rem; background: transparent; border: none; color: var(--text-secondary); cursor: pointer; padding: 0.25rem; display: flex; align-items: center; justify-content: center; border-radius: 4px; transition: all 0.2s; &:hover { background: var(--bg-tertiary); color: var(--text-primary); } } .icon { display: flex; justify-content: center; margin-bottom: 1.5rem; svg { stroke-width: 2; } } .iconSuccess { color: #10b981; } .iconWarning { color: #f59e0b; } .iconError { color: #ef4444; } .iconConfirm { color: #3b82f6; } .iconInfo { color: #6b7280; } .title { font-size: 1.5rem; font-weight: 600; color: var(--text-primary); margin: 0 0 1rem 0; text-align: center; } .message { font-size: 1rem; color: var(--text-secondary); line-height: 1.6; margin: 0 0 2rem 0; text-align: center; white-space: pre-wrap; } .actions { display: flex; gap: 0.75rem; justify-content: center; button { flex: 1; padding: 0.75rem 1.5rem; border-radius: 8px; font-size: 1rem; font-weight: 500; cursor: pointer; transition: all 0.2s; border: none; min-width: 100px; &:disabled { opacity: 0.5; cursor: not-allowed; } } } .confirmBtn { background: var(--node-action); color: white; &:hover:not(:disabled) { background: #2563eb; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3); } &:active:not(:disabled) { transform: translateY(0); } } .cancelBtn { background: var(--bg-tertiary); color: var(--text-primary); border: 1px solid var(--border-color); &:hover:not(:disabled) { background: var(--bg-secondary); border-color: var(--text-secondary); } }