'use client'; import { VisuallyHidden, useSwitch } from '@nextui-org/react'; import { useTheme } from 'next-themes'; export const MoonIcon = (props) => ( ); export const SunIcon = (props) => ( ); export function ThemeSwitcher(props) { const { setTheme, theme } = useTheme(); const { Component, slots, isSelected, getBaseProps, getInputProps, getWrapperProps, } = useSwitch({ onClick: () => setTheme(theme === 'dark' ? 'light' : 'dark'), isSelected: theme === 'dark', }); return (
{isSelected ? : }
); }