({setColorScheme})
| 3 | import Light from '@spectrum-icons/workflow/Light'; |
| 4 | |
| 5 | export default function ThemeSwitcher({setColorScheme}) { |
| 6 | let {colorScheme} = useProvider(); |
| 7 | let label = colorScheme === 'dark' ? 'Switch to light theme' : 'Switch to dark theme'; |
| 8 | let otherScheme = colorScheme === 'light' ? 'dark' : 'light'; |
| 9 | |
| 10 | return ( |
| 11 | <div className="absolute right-0 m-50"> |
| 12 | <ActionButton aria-label={label} onPress={() => setColorScheme(otherScheme)}> |
| 13 | {colorScheme === 'dark' ? <Light /> : <Moon />} |
| 14 | </ActionButton> |
| 15 | </div> |
| 16 | ); |
| 17 | } |
nothing calls this directly
no test coverage detected