// From the Chakra CRA/TS starter import * as React from 'react' import { useColorMode, useColorModeValue, IconButton, IconButtonProps, Tooltip, Text, Box, HStack, } from '@chakra-ui/react' import { FaMoon, FaSun } from 'react-icons/fa' type ColorModeSwitcherProps = Omit export const ColorModeSwitcher: React.FC = (props) => { const { toggleColorMode } = useColorMode() const text = useColorModeValue('dark', 'light') const SwitchIcon = useColorModeValue(FaMoon, FaSun) const label = `Switch to ${text} mode` return ( } aria-label={label} /> {props.title} ) }