Skip to content

🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.

refactor(calendar): simplify icon components for left and right chevrons

Bill Yang73c365339b98
diff --git a/client/src/components/ui/calendar.tsx b/client/src/components/ui/calendar.tsx
index 0d6bdf026..cc966e8be 100644
--- a/client/src/components/ui/calendar.tsx
+++ b/client/src/components/ui/calendar.tsx
@@ -61,13 +61,12 @@ function Calendar({
...classNames,
}}
components={{
- Chevron: (props) => {
- if (props.orientation === "left") {
- return <ChevronLeft className={cn("h-4 w-4", className)} {...props} />
- }
-
- return <ChevronRight className={cn("h-4 w-4", className)} {...props} />
- },
+ 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}
/>