Files
sam-react-prod/src/components/common/ScheduleCalendar/MorePopover.tsx

45 lines
992 B
TypeScript
Raw Normal View History

'use client';
import { cn } from '@/components/ui/utils';
import type { ScheduleEvent } from './types';
interface MorePopoverProps {
date: Date;
events: ScheduleEvent[];
hiddenCount: number;
onEventClick: (event: ScheduleEvent) => void;
onDateClick?: (date: Date) => void;
}
/**
*
* - +N
* - ( )
*/
export function MorePopover({
date,
hiddenCount,
onDateClick,
}: MorePopoverProps) {
if (hiddenCount <= 0) return null;
const handleClick = (e: React.MouseEvent) => {
e.stopPropagation();
// 날짜 선택 → 테이블 필터링
onDateClick?.(date);
};
return (
<button
type="button"
className={cn(
'text-xs font-medium text-muted-foreground',
'hover:text-primary hover:underline',
'transition-colors cursor-pointer'
)}
onClick={handleClick}
>
+{hiddenCount}
</button>
);
}