Skip to content

Commit

Permalink
fix typecheck
Browse files Browse the repository at this point in the history
  • Loading branch information
Brooooooklyn committed Sep 3, 2024
1 parent 0b064d3 commit 3861762
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions packages/frontend/admin/src/components/ui/calendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { buttonVariants } from '@affine/admin/components/ui/button';
import { cn } from '@affine/admin/utils';
import { ChevronLeft, ChevronRight } from 'lucide-react';
import type * as React from 'react';
import { DayPicker } from 'react-day-picker';
import { Chevron,DayPicker } from 'react-day-picker';

export type CalendarProps = React.ComponentProps<typeof DayPicker>;

Expand Down Expand Up @@ -51,8 +51,15 @@ function Calendar({
...classNames,
}}
components={{
IconLeft: () => <ChevronLeft className="w-4 h-4" />,
IconRight: () => <ChevronRight className="w-4 h-4" />,
Chevron: props => {
if (props.orientation === 'left') {
return <ChevronLeft className="w-4 h-4" />;
}
if (props.orientation === 'right') {
return <ChevronRight className="w-4 h-4" />;
}
return <Chevron {...props} />;
},
}}
{...props}
/>
Expand Down

0 comments on commit 3861762

Please sign in to comment.