Skip to content

Commit 933b32a

Browse files
committed
Refine legend chip styling
1 parent 0d3b928 commit 933b32a

File tree

1 file changed

+27
-17
lines changed

1 file changed

+27
-17
lines changed

src/App.tsx

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -220,25 +220,35 @@ const LegendSummary = ({
220220
count: string;
221221
description: string;
222222
isDark: boolean;
223-
}) => (
224-
<div className={`flex flex-shrink-0 items-center gap-3 rounded-full px-3 py-2 ${isDark ? 'bg-white/5 text-white' : 'bg-slate-200/80 text-slate-900'}`}>
225-
<div className="flex items-center gap-2">
226-
<span className="h-2 w-2 rounded-full" style={{ backgroundColor: color }} />
227-
<span className="text-sm font-medium">{label}</span>
228-
</div>
229-
<div>
230-
<p className="font-display text-sm">{count}</p>
231-
<p className={`text-[0.6rem] uppercase tracking-[0.3em] ${isDark ? 'text-slate-500' : 'text-slate-600'}`}>{description}</p>
223+
}) => {
224+
const chipClass = isDark
225+
? 'bg-white/5 text-white border border-white/10'
226+
: 'bg-transparent text-slate-900 border border-slate-200/70';
227+
return (
228+
<div className={`flex flex-shrink-0 items-center gap-3 rounded-full px-3 py-2 ${chipClass}`}>
229+
<div className="flex items-center gap-2">
230+
<span className="h-2 w-2 rounded-full" style={{ backgroundColor: color }} />
231+
<span className="text-sm font-medium">{label}</span>
232+
</div>
233+
<div>
234+
<p className="font-display text-sm">{count}</p>
235+
<p className={`text-[0.6rem] uppercase tracking-[0.3em] ${isDark ? 'text-slate-500' : 'text-slate-600'}`}>{description}</p>
236+
</div>
232237
</div>
233-
</div>
234-
);
238+
);
239+
};
235240

236-
const InfoPill = ({ label, value, isDark }: { label: string; value: string; isDark: boolean }) => (
237-
<div className={`flex-shrink-0 rounded-full px-3 py-2 ${isDark ? 'bg-white/5 text-white' : 'bg-slate-200/80 text-slate-900'}`}>
238-
<p className={`text-[0.6rem] uppercase tracking-[0.3em] ${isDark ? 'text-slate-500' : 'text-slate-600'}`}>{label}</p>
239-
<p className="text-sm font-medium">{value}</p>
240-
</div>
241-
);
241+
const InfoPill = ({ label, value, isDark }: { label: string; value: string; isDark: boolean }) => {
242+
const chipClass = isDark
243+
? 'bg-white/5 text-white border border-white/10'
244+
: 'bg-transparent text-slate-900 border border-slate-200/70';
245+
return (
246+
<div className={`flex-shrink-0 rounded-full px-3 py-2 ${chipClass}`}>
247+
<p className={`text-[0.6rem] uppercase tracking-[0.3em] ${isDark ? 'text-slate-500' : 'text-slate-600'}`}>{label}</p>
248+
<p className="text-sm font-medium">{value}</p>
249+
</div>
250+
);
251+
};
242252

243253
const LoadingOverlay = ({ isDark }: { isDark: boolean }) => (
244254
<div

0 commit comments

Comments
 (0)