mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2026-07-15 07:17:00 +10:00
3aaef5f730
- implement metadata context
31 lines
711 B
JavaScript
31 lines
711 B
JavaScript
import cx from 'classnames';
|
|
import { graphql, useStaticQuery } from 'gatsby';
|
|
import GatsbyImage from 'gatsby-image';
|
|
import React, { memo } from 'react';
|
|
import styles from './Logo.module.css';
|
|
|
|
const Logo = ({ size = '256px', className }) => {
|
|
const { file } = useStaticQuery(graphql`
|
|
query {
|
|
file(relativePath: { eq: "logo.png" }) {
|
|
childImageSharp {
|
|
fluid(maxWidth: 512) {
|
|
...GatsbyImageSharpFluid
|
|
}
|
|
}
|
|
}
|
|
}
|
|
`);
|
|
|
|
return (
|
|
<GatsbyImage
|
|
loading="eager"
|
|
className={cx(styles.logo, className)}
|
|
style={{ width: size, height: size }}
|
|
fluid={file.childImageSharp.fluid}
|
|
/>
|
|
);
|
|
};
|
|
|
|
export default memo(Logo);
|