28 lines
589 B
TypeScript
28 lines
589 B
TypeScript
import React from "react";
|
|
import { useCardAnimation } from "./hooks/useCardAnimation";
|
|
|
|
interface CardListProps {
|
|
items: any[];
|
|
className?: string;
|
|
}
|
|
|
|
export default function CardList({ items, className = "" }: CardListProps) {
|
|
const state = useCardAnimation({
|
|
rotationX: 0,
|
|
rotationY: 0,
|
|
rotationZ: 0,
|
|
perspective: 1000,
|
|
duration: 0.3,
|
|
});
|
|
|
|
return (
|
|
<div className={`card-list-container ${className}`}>
|
|
{items.map((item, index) => (
|
|
<div key={index} className="card-item">
|
|
{item.label}
|
|
</div>
|
|
))}
|
|
</div>
|
|
);
|
|
}
|