/** * Button to toggle between light and dark mode themes. */ import { Theme } from "./theme"; import AstralButton from "./AstralButton"; export default function ThemeButton({ theme, onChange, }: { theme: Theme; onChange: (theme: Theme) => void; }) { return ( onChange(theme === "light" ? "dark" : "light")} > Switch to dark theme Switch to light theme ); }