@littlepartytime/dev-kit 1.6.2 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -191,15 +191,35 @@ export default function Preview() {
|
|
|
191
191
|
{/* Player Switcher */}
|
|
192
192
|
<div className="bg-zinc-900 rounded-lg p-3">
|
|
193
193
|
<h3 className="text-sm font-bold text-zinc-400 mb-2">Current Player</h3>
|
|
194
|
-
<
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
194
|
+
<div className="space-y-1">
|
|
195
|
+
{mockPlayers.map((p, i) => {
|
|
196
|
+
const isActive = i === playerIndex;
|
|
197
|
+
const hue = (i * 137) % 360; // deterministic color per player
|
|
198
|
+
return (
|
|
199
|
+
<button
|
|
200
|
+
key={p.id}
|
|
201
|
+
onClick={() => setPlayerIndex(i)}
|
|
202
|
+
className={`w-full flex items-center gap-2 px-2 py-1.5 rounded text-sm text-left transition-colors ${
|
|
203
|
+
isActive
|
|
204
|
+
? 'bg-amber-600/20 ring-1 ring-amber-500 text-white'
|
|
205
|
+
: 'bg-zinc-800 hover:bg-zinc-700 text-zinc-300'
|
|
206
|
+
}`}
|
|
207
|
+
>
|
|
208
|
+
{/* Avatar */}
|
|
209
|
+
<div
|
|
210
|
+
className="w-6 h-6 rounded-full flex items-center justify-center text-xs font-bold shrink-0"
|
|
211
|
+
style={{ background: `hsl(${hue}, 55%, 45%)` }}
|
|
212
|
+
>
|
|
213
|
+
{p.nickname[0]}
|
|
214
|
+
</div>
|
|
215
|
+
<span className="truncate">{p.nickname}</span>
|
|
216
|
+
{p.isHost && (
|
|
217
|
+
<span className="ml-auto text-[10px] text-amber-400 shrink-0">HOST</span>
|
|
218
|
+
)}
|
|
219
|
+
</button>
|
|
220
|
+
);
|
|
221
|
+
})}
|
|
222
|
+
</div>
|
|
203
223
|
</div>
|
|
204
224
|
|
|
205
225
|
{/* Game Result */}
|