({ ...others }: IconProps)
| 25 | ); |
| 26 | |
| 27 | export const ThemeButton = ({ ...others }: IconProps) => { |
| 28 | const { setColorScheme } = useMantineColorScheme(); |
| 29 | const colorScheme = useComputedColorScheme('light'); |
| 30 | |
| 31 | return ( |
| 32 | <Tooltip label="Toggle color scheme"> |
| 33 | <ActionIcon |
| 34 | variant="transparent" |
| 35 | aria-label="Toggle color scheme" |
| 36 | onClick={() => { |
| 37 | setColorScheme(colorScheme === 'dark' ? 'light' : 'dark'); |
| 38 | }} |
| 39 | > |
| 40 | <ColorSchemeIcons {...others} /> |
| 41 | </ActionIcon> |
| 42 | </Tooltip> |
| 43 | ); |
| 44 | }; |
| 45 | |
| 46 | export const ThemeButtonMobile = ({ ...others }: IconProps) => { |
| 47 | const { setColorScheme } = useMantineColorScheme(); |
nothing calls this directly
no outgoing calls
no test coverage detected