score:1

Accepted answer
const ImageContainer = styled.div`
  display: flex;
  background-color: ${({ height, width }) => (height > width) ? 'red' : 'blue'}
`

function Gallery({gallery}) {
  return (
    {gallery.map(image => {
      return (
        <ImageContainer key={image.id} height={image.height} width={image.width}>
          <img src={image.thumb} alt="puppy" />
        </ImageContainer>
      )
    })}
  )
}

Related Query

More Query from same tag