Fix: Type safety and unit validation

This commit is contained in:
gpt-engineer-app[bot]
2025-10-21 15:05:50 +00:00
parent bcba0a4f0c
commit 65a6ed1acb
10 changed files with 146 additions and 32 deletions

View File

@@ -55,17 +55,9 @@ function Calendar({ className, classNames, showOutsideDays = true, ...props }: C
...classNames,
}}
components={{
// DOCUMENTED EXCEPTION: Radix UI Calendar types require complex casting
// The react-day-picker component's internal types don't match the external API
// Safe because React validates component props at runtime
// See: https://github.com/gpbl/react-day-picker/issues
Chevron: ({ orientation, ...props }: any) => {
if (orientation === 'left') {
return <ChevronLeft className="h-4 w-4" />;
}
return <ChevronRight className="h-4 w-4" />;
},
} as any}
IconLeft: () => <ChevronLeft className="h-4 w-4" />,
IconRight: () => <ChevronRight className="h-4 w-4" />,
}}
{...props}
/>
);