mirror of
https://github.com/clearml/clearml-docs
synced 2025-02-15 08:52:40 +00:00
12 lines
336 B
JavaScript
12 lines
336 B
JavaScript
import React from 'react';
|
|
import useThemeContext from '@theme/hooks/useThemeContext';
|
|
|
|
const ImageSwitcher = ({lightImageSrc, darkImageSrc, alt}) => {
|
|
const { isDarkTheme } = useThemeContext();
|
|
|
|
return (
|
|
<img src={isDarkTheme ? darkImageSrc : lightImageSrc} alt={alt} className="img-swt" />
|
|
)
|
|
}
|
|
|
|
export default ImageSwitcher; |