-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNotifications.tsx
More file actions
48 lines (43 loc) · 1.68 KB
/
Notifications.tsx
File metadata and controls
48 lines (43 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import React, { useState } from 'react';
import { ArrowLeft, Bell } from 'lucide-react';
import { GlassCard } from '../GlassCard';
interface NotificationsProps {
onBack: () => void;
}
export const Notifications: React.FC<NotificationsProps> = ({ onBack }) => {
const [notificationsEnabled, setNotificationsEnabled] = useState(false);
return (
<div className="min-h-screen p-4">
<button
onClick={onBack}
className="mb-6 p-2 rounded-full hover:bg-white/5 transition-colors"
>
<ArrowLeft className="text-white" size={24} />
</button>
<h2 className="text-2xl font-bold mb-6">Уведомления</h2>
<GlassCard className="p-6">
<div className="flex items-center justify-between">
<div className="flex items-center space-x-4">
<div className="p-2 bg-white/5 rounded-xl">
<Bell className="w-6 h-6 text-white" />
</div>
<div>
<h3 className="text-lg font-semibold">Push-уведомления</h3>
<p className="text-sm text-gray-400">Получать уведомления о новых статьях</p>
</div>
</div>
<button
onClick={() => setNotificationsEnabled(!notificationsEnabled)}
className={`w-12 h-6 rounded-full transition-colors relative
${notificationsEnabled ? 'bg-white/20' : 'bg-white/5'}`}
>
<div
className={`absolute w-5 h-5 rounded-full bg-white transition-transform
${notificationsEnabled ? 'translate-x-6' : 'translate-x-1'}`}
/>
</button>
</div>
</GlassCard>
</div>
);
};