260706_01_ENH: DataTable 버그 수정 및 Date 관련 컴포넌트 추가

This commit is contained in:
2026-07-06 15:22:51 +09:00
parent 88043ecc34
commit e77fe4368a
13 changed files with 476 additions and 244 deletions

View File

@@ -0,0 +1,27 @@
import type { HTMLAttributes } from "react";
import { cn } from "@/lib/utils";
export type CalendarDateRange = {
from?: Date;
to?: Date;
};
type CalendarBaseProps = Omit<HTMLAttributes<HTMLDivElement>, "onSelect">;
type CalendarSingleProps = CalendarBaseProps & {
mode: "single";
selected?: Date;
onSelect?: (date: Date | undefined) => void;
};
type CalendarRangeProps = CalendarBaseProps & {
mode: "range";
selected?: CalendarDateRange;
onSelect?: (range: CalendarDateRange | undefined) => void;
};
export type CalendarProps = CalendarSingleProps | CalendarRangeProps;
export function Calendar({ className, ...props }: CalendarProps) {
return <div className={cn(className)} data-mode={props.mode} />;
}