| 40 | }) |
| 41 | |
| 42 | function showNotification(message: string, type: 'success' | 'error') { |
| 43 | const el = document.createElement('div') |
| 44 | el.style.cssText = ` |
| 45 | position: fixed; top: 16px; right: 16px; z-index: 9999; |
| 46 | padding: 12px 24px; border-radius: 4px; color: white; |
| 47 | background: ${type === 'success' ? '#22c55e' : '#ef4444'}; |
| 48 | animation: fadeIn 0.3s ease-in; |
| 49 | ` |
| 50 | el.textContent = message |
| 51 | document.body.appendChild(el) |
| 52 | setTimeout(() => el.remove(), 3000) |
| 53 | } |
| 54 | |
| 55 | export default function App() { |
| 56 | return ( |