import { useTheme } from "../../../hooks"; export default function ThemedPicture({ srcLight, srcDark, alt, ...props }: { srcLight: string; srcDark: string; } & React.ImgHTMLAttributes) { // Cannot use `colorScheme` from UIContext, because it always returns "dark". const theme = useTheme(); return ( {theme === "os-default" && ( <> )} {alt} ); }