dawit45 commited on
Commit
56a5e0e
·
verified ·
1 Parent(s): dbc62f0

Create src/components/SettingsView.tsx

Browse files
Files changed (1) hide show
  1. src/components/SettingsView.tsx +53 -0
src/components/SettingsView.tsx ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import React from 'react';
2
+ import { useOncologyStore } from '../store/useOncologyStore';
3
+ import { Sun, Moon, Monitor, AlertTriangle } from 'lucide-react';
4
+
5
+ const SettingsView = () => {
6
+ const { theme, setTheme, isToxicityModelEnabled, toggleToxicityModel } = useOncologyStore();
7
+
8
+ return (
9
+ <div className="max-w-4xl mx-auto space-y-10">
10
+ <header>
11
+ <h2 className="text-4xl font-black uppercase italic tracking-tighter">System Configuration</h2>
12
+ <p className="text-[10px] font-black text-slate-500 uppercase tracking-widest">Framework v15.0.0</p>
13
+ </header>
14
+
15
+ <section className="bg-slate-50 dark:bg-slate-900 border border-slate-200 dark:border-slate-800 p-8 rounded-[2.5rem]">
16
+ <h3 className="text-xs font-black uppercase mb-6">Visual Environment</h3>
17
+ <div className="grid grid-cols-3 gap-4">
18
+ {[
19
+ { id: 'light', icon: Sun, label: 'Light' },
20
+ { id: 'dark', icon: Moon, label: 'Dark' },
21
+ { id: 'system', icon: Monitor, label: 'System' }
22
+ ].map((t) => (
23
+ <button
24
+ key={t.id}
25
+ onClick={() => setTheme(t.id as any)}
26
+ className={`flex flex-col items-center p-6 rounded-2xl border transition-all ${
27
+ theme === t.id ? 'border-sky-500 bg-sky-500/10 text-sky-500' : 'border-slate-200 dark:border-slate-800'
28
+ }`}
29
+ >
30
+ <t.icon size={24} className="mb-2" />
31
+ <span className="text-[10px] font-black uppercase">{t.label}</span>
32
+ </button>
33
+ ))}
34
+ </div>
35
+ </section>
36
+
37
+ <section className="bg-slate-50 dark:bg-slate-900 border border-slate-200 dark:border-slate-800 p-8 rounded-[2.5rem] flex justify-between items-center">
38
+ <div>
39
+ <h3 className="text-xs font-black uppercase">Toxicity Predictive Model</h3>
40
+ <p className="text-[10px] font-bold text-slate-500 mt-1">Enable real-time AE forecasting & risk stratification.</p>
41
+ </div>
42
+ <button
43
+ onClick={toggleToxicityModel}
44
+ className={`w-14 h-8 rounded-full transition-all flex items-center px-1 ${isToxicityModelEnabled ? 'bg-emerald-500' : 'bg-slate-700'}`}
45
+ >
46
+ <div className={`w-6 h-6 bg-white rounded-full transition-transform ${isToxicityModelEnabled ? 'translate-x-6' : 'translate-x-0'}`} />
47
+ </button>
48
+ </section>
49
+ </div>
50
+ );
51
+ };
52
+
53
+ export default SettingsView;