import React from 'react'; import { GatsbyImage } from 'gatsby-plugin-image'; import { Theme, useGlobalState } from '../../context'; import { SiteConfiguration, useSiteConfiguration } from '../../hooks/useSiteConfiguration'; import * as classes from './style.module.css'; interface LogoProps { fontSize?: string; color?: string; theme?: Theme; } export function Logo(props: LogoProps): React.ReactElement { const { globalState } = useGlobalState(); const { logo } = useSiteConfiguration(); const fontSize = props.fontSize || '2rem'; const color = props.color || 'var(--primary-color)'; const Logo = getLogoContent(logo.image, logo.text); const LogoDark = getLogoContent(logo.imageDark, logo.text); const theme = props.theme ?? globalState.theme; const ThemeSpecificLogo = theme === Theme.Dark ? LogoDark || Logo : Logo; return (