import React from 'react'
import InfoBox from './InfoBox'

const Service = ({ ...props }) => (
  <div
    className={`md:flex ${props.classes} ${
      props.reversed ? 'flex-row-reverse' : ''
    } items-center justify-center m-auto`}
  >
    <img
      src={props.img}
      className={`w-full md:max-w-sm p-4 ${props.imgClasses}`}
      alt={`${props.title} agency`}
    />
    <InfoBox
      h2Classes={props.h2Classes}
      classes="p-4 md:max-w-sm"
      headline={props.title}
      text={props.text}
    />
  </div>
)

export default Service
