import { FunctionComponent } from 'react'

const TileContainer: FunctionComponent = ({ children }) => {
  return (
    <div className='tile-container'>
      {children}
      <style jsx>{`
        .tile-container {
          display: grid;
          grid-template-columns: 1fr;
        }

        @media (min-width: 768px) {
          .tile-container {
            grid-template-columns: 1fr 1fr;
            grid-gap: 2em;
          }
        }

        @media (min-width: 1024px) {
          .tile-container {
            grid-template-columns: 1fr 1fr 1fr;
          }
        }
      `}</style>
    </div>
  )
}

export default TileContainer
