Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

DiffPanel.tsx

52 lines2.1 KB

1import { useStore } from "../store";
2​
3export default function DiffPanel() {
4 const { dispatch } = useStore();
5​
6 return (
7 <aside className="flex h-full w-[400px] shrink-0 flex-col border-l border-white/[0.08] bg-[#141414]">
8 {/* Header */}
9 <div className="drag-region flex items-center justify-between border-b border-white/[0.08] px-4 pt-[28px] pb-3">
10 <h3 className="text-xs font-medium text-[#e0e0e0]">Uncommitted changes</h3>
11 <button
12 type="button"
13 className="text-[#a0a0a0]/40 transition-colors duration-150 hover:text-[#a0a0a0]/70"
14 onClick={() => dispatch({ type: "TOGGLE_DIFF" })}
15 >
16 <span className="text-sm">&times;</span>
17 </button>
18 </div>
19​
20 {/* Placeholder content */}
21 <div className="flex-1 overflow-y-auto p-4">
22 <div className="space-y-3">
23 <div className="rounded-lg border border-white/[0.06] bg-white/[0.02] p-3">
24 <div className="mb-2 flex items-center gap-2">
25 <span className="rounded bg-emerald-500/20 px-1.5 py-0.5 text-[9px] font-medium text-emerald-400">
26 M
27 </span>
28 <span className="font-mono text-xs text-[#a0a0a0]/60">src/App.tsx</span>
29 </div>
30 <div className="space-y-0.5 font-mono text-[11px]">
31 <div className="text-red-400/60">- const oldValue = "hello";</div>
32 <div className="text-emerald-400/60">+ const newValue = "world";</div>
33 </div>
34 </div>
35​
36 <div className="rounded-lg border border-white/[0.06] bg-white/[0.02] p-3">
37 <div className="flex items-center gap-2">
38 <span className="rounded bg-blue-500/20 px-1.5 py-0.5 text-[9px] font-medium text-blue-400">
39 A
40 </span>
41 <span className="font-mono text-xs text-[#a0a0a0]/60">src/utils.ts</span>
42 </div>
43 </div>
44 </div>
45​
46 <p className="mt-6 text-center text-[10px] text-[#a0a0a0]/25">
47 Diff integration coming soon
48 </p>
49 </div>
50 </aside>
51 );