The React Code for an event

function Event(props) {
  return (
      <div className="Event-Container">
        <a href={props.href} id={props.id} className="Event-container-link">
          <figure className="Event-figure">
            <img className="Event-image" src={props.TimelineImage} alt="Error" />
          </figure>
          <div className="Event-body">
            <span className="Event-date">{props.date}</span>
            <span className="Event-location">{props.location}.</span>
            <h3 className="Event-title">{props.title}</h3>
          </div>
        </a>
      </div>
    </div>
  );
}

Props

  • Date: When the event happened
  • Location: Where the event happened
  • Title: 1 sentence describing the event
  • Image: The src/url of the pic we want to display
  • TimelineImage: The image shown during the initial timeline