import React from 'react'
import Image from 'next/image';

interface Props {
    children: React.ReactNode;
    src: string;
    width: number;
    height: number;
  }

export const PictureText: React.FC<Props> = ({src, width, height, children}) => {
    return(
        <div className={'pictureText_main'}>
            <Image
                className = {'pictureText_img'}
                src={src}
                alt={'pizza'}
                width={width}
                height={height}
            />
           
                <p className={'pictureText_text'}>{children}</p>
            </div>
        </div>
    )
}