Files

26 lines
647 B
TypeScript
Raw Permalink Normal View History

2025-09-03 20:41:25 -04:00
interface InformationProps {
[key: string]: string | number | undefined;
}
export default function Information(props: InformationProps) {
2025-10-08 12:01:52 -06:00
const entries = Object.entries(props).filter(
([_, value]) => value !== undefined
);
2025-09-03 20:41:25 -04:00
2025-10-08 12:01:52 -06:00
if (entries.length === 0) return null;
2025-09-03 20:41:25 -04:00
return (
<div className="information">
2025-10-08 12:01:52 -06:00
<ul className="informationList">
2025-09-03 20:41:25 -04:00
{entries.map(([key, value]) => (
2025-10-08 12:01:52 -06:00
<li key={key} className="informationItem">
<span className="informationKey">{key}</span>
2026-03-03 17:36:06 -06:00
<span className={`informationValue ${key}`}>{value}</span>
2025-09-03 20:41:25 -04:00
</li>
))}
</ul>
</div>
);
2025-10-08 12:01:52 -06:00
}
//IO