Refactor theme provider import and enhance calendar component for dynamic icon rendering
This commit is contained in:
parent
80938d0e6d
commit
4ee0c65053
@ -1,6 +1,6 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import type { ThemeProviderProps } from "next-themes/dist/types";
|
import type { ThemeProviderProps } from "next-themes";
|
||||||
|
|
||||||
import { ThemeProvider as NextThemesProvider } from "next-themes";
|
import { ThemeProvider as NextThemesProvider } from "next-themes";
|
||||||
|
|
||||||
|
@ -54,8 +54,12 @@ function Calendar({
|
|||||||
...classNames,
|
...classNames,
|
||||||
}}
|
}}
|
||||||
components={{
|
components={{
|
||||||
IconLeft: ({ ...props }) => <ChevronLeft className="h-4 w-4" />,
|
Chevron: ({ ...props }) => {
|
||||||
IconRight: ({ ...props }) => <ChevronRight className="h-4 w-4" />,
|
if (props.orientation === "left") {
|
||||||
|
return <ChevronLeft className="h-4 w-4" />;
|
||||||
|
}
|
||||||
|
return <ChevronRight className="h-4 w-4" />;
|
||||||
|
},
|
||||||
}}
|
}}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user