diff --git a/src/components/ThemeSwitcher.astro b/src/components/ThemeSwitcher.astro index 167764c..25b1796 100644 --- a/src/components/ThemeSwitcher.astro +++ b/src/components/ThemeSwitcher.astro @@ -11,6 +11,7 @@ interface Props extends HTMLAttributes<"div"> { darkBgClass?: string[]; lightBgClass?: string[]; rootExtraClass?: string; + onChange?: (mode: "light" | "dark" | "system") => void; } const { @@ -22,6 +23,7 @@ const { lightBgClass = [], rootExtraClass = "", class: className, + onChange, ...rest }: Props = Astro.props; @@ -91,7 +93,7 @@ const checkBase = "wr:size-4 wr:opacity-0 wr:scale-90 wr:transition"; } -