N-FIN-90: update shadcn calendar component to fix build error

This commit is contained in:
Markus Thielker 2025-03-09 05:18:37 +01:00
parent 237131aa11
commit 25793bb7c9
3 changed files with 9 additions and 5 deletions

View file

@ -46,7 +46,7 @@ function Calendar({
'bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground',
day_today: 'bg-accent text-accent-foreground',
day_outside:
'day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30',
'day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground',
day_disabled: 'text-muted-foreground opacity-50',
day_range_middle:
'aria-selected:bg-accent aria-selected:text-accent-foreground',
@ -54,8 +54,12 @@ function Calendar({
...classNames,
}}
components={{
IconLeft: ({...props}) => <ChevronLeft className="h-4 w-4"/>,
IconRight: ({...props}) => <ChevronRight className="h-4 w-4"/>,
IconLeft: ({className, ...props}) => (
<ChevronLeft className={cn('h-4 w-4', className)} {...props} />
),
IconRight: ({className, ...props}) => (
<ChevronRight className={cn('h-4 w-4', className)} {...props} />
),
}}
{...props}
/>