25 lines
646 B
TypeScript
25 lines
646 B
TypeScript
import { ReactNode } from 'react';
|
|
import { CardStackProvider, CardStackContextType } from './CardStackContext';
|
|
|
|
export interface CardStackProps {
|
|
children: ReactNode;
|
|
className?: string;
|
|
ariaLabel?: string;
|
|
}
|
|
|
|
export default function CardStack({ children, className = '', ariaLabel = 'Card stack' }: CardStackProps) {
|
|
const contextValue: CardStackContextType = {
|
|
isVisible: true,
|
|
getAnimationProps: () => ({ isVisible: true }),
|
|
itemRefs: {}
|
|
};
|
|
|
|
return (
|
|
<CardStackProvider value={contextValue}>
|
|
<div className={className} aria-label={ariaLabel}>
|
|
{children}
|
|
</div>
|
|
</CardStackProvider>
|
|
);
|
|
}
|