File size: 1,232 Bytes
cce8120 | 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 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | "use client";
import {useState} from "react";
export default function WorkspaceSettings(){
const [theme,setTheme]=useState("dark");
const [autosave,setAutosave]=useState(true);
const [ai,setAi]=useState(true);
return(
<div className="h-full bg-neutral-950 text-white p-6 overflow-auto">
<h2 className="text-2xl font-bold mb-6">
Workspace Settings
</h2>
<div className="space-y-6">
<div>
<label className="block mb-2 font-semibold">
Theme
</label>
<select
value={theme}
onChange={e=>setTheme(e.target.value)}
className="w-full rounded bg-neutral-900 border border-neutral-700 p-2"
>
<option value="dark">Dark</option>
<option value="light">Light</option>
<option value="system">System</option>
</select>
</div>
<div className="flex items-center justify-between border-b border-neutral-800 pb-4">
<span>Autosave</span>
<input
type="checkbox"
checked={autosave}
onChange={()=>setAutosave(!autosave)}
/>
</div>
<div className="flex items-center justify-between border-b border-neutral-800 pb-4">
<span>AI Assistant</span>
<input
type="checkbox"
checked={ai}
onChange={()=>setAi(!ai)}
/>
</div>
<button
className="mt-8 px-5 py-2 rounded bg-blue-600 hover:bg-blue-700"
>
Save Settings
</button>
</div>
</div>
);
}
|