docs/js/demos/react.js
function PhotoItem({ id, username, src, name }) {
  return (
    <div key={id} className="col-3@xs col-4@sm photo-item">
      <div className="aspect aspect--4x3">
        <div className="aspect__inner">
          <img src={src} />
          <PhotoAttribution username={username} name={name} />
        </div>
      </div>
    </div>
  )
}
function PhotoItem({ id, username, src, name }) {
  return (
    <div key={id} className="col-3@xs col-4@sm photo-item">
      <div className="aspect aspect--4x3">
        <div className="aspect__inner">
          <img src={src} />
          <PhotoAttribution username={username} name={name} />
        </div>
      </div>
    </div>
  )
}
function PhotoItem ( { id , username , src , name } ) { return ( < div key = { id } className = "col-3@xs col-4@sm photo-item" > < div className = "aspect aspect--4x3" > < div className = "aspect__inner" > < img src = { src } / > < PhotoAttribution username = { username } name = { name } / > < / div > < / div > < / div > ) }
A grid item for a photo.
@param {{ id: number, username: string, src: string, name: string }} props Component props.
@return {JSX.Element}
A grid item for a photo .