feat(home): icons on carou

This commit is contained in:
Julien Froidefond
2025-02-23 19:05:37 +01:00
parent 011092a87d
commit e8d496c8c9
2 changed files with 27 additions and 6 deletions

View File

@@ -26,9 +26,10 @@ interface OptimizedBook extends BaseItem {
interface MediaRowProps {
title: string;
items: (OptimizedSeries | OptimizedBook)[];
icon?: React.ReactNode;
}
export function MediaRow({ title, items }: MediaRowProps) {
export function MediaRow({ title, items, icon }: MediaRowProps) {
const scrollContainerRef = useRef<HTMLDivElement>(null);
const [showLeftArrow, setShowLeftArrow] = useState(false);
const [showRightArrow, setShowRightArrow] = useState(true);
@@ -58,7 +59,10 @@ export function MediaRow({ title, items }: MediaRowProps) {
return (
<div className="space-y-4">
<h2 className="text-2xl font-bold tracking-tight">{title}</h2>
<div className="flex items-center gap-2">
{icon}
<h2 className="text-2xl font-bold tracking-tight">{title}</h2>
</div>
<div className="relative">
{/* Bouton de défilement gauche */}
{showLeftArrow && (