import react from 'react';

import '../theme/background.css';

const Background: react.FC<{ shift: { x: number; y: number } }> = (props: {
  shift: { x: number; y: number };
}) => {
  console.log(`--- Rendering background, props: ${JSON.stringify(props)} ---`);

  return (
    <div
      className='background'
      style={{
        transform: `translate(${-props.shift.x}px, ${-props.shift.y}px)`,
      }}
    >
      <img src='/assets/background.jpg' alt='' />
    </div>
  );
};

export default Background;
