Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ function App() {
<h1 className="App-title">Application title</h1>
</header>
<main className="App-main">
<Timeline timelineEvents={timelineData.events}/>
</main>
</div>
);
Expand Down
1 change: 1 addition & 0 deletions src/components/Timeline.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
width: 30%;
margin: auto;
text-align: left;
word-wrap: break-word;
}
13 changes: 9 additions & 4 deletions src/components/Timeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,14 @@ import React from 'react';
import './Timeline.css';
import TimelineEvent from './TimelineEvent';

const Timeline = () => {

return;

const Timeline = (props) => {
const events = props.timelineEvents.map((item,index) => <TimelineEvent key={index} person={item.person} status={item.status} timeStamp={item.timeStamp}/>);
return(
<div className="timeline">
{events}
</div>
);
}

export default Timeline;
export default Timeline;
15 changes: 12 additions & 3 deletions src/components/TimelineEvent.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,18 @@ import React from 'react';
import './TimelineEvent.css';
import Timestamp from './Timestamp';

const TimelineEvent = () => {
const TimelineEvent = (props) => {

return;
return(
<div className="timeline-event" >
<h3 className= "event-person">{props.person} </h3>
<p3 className= "event-status">{props.status}</p3>
<p1 className= "event-time"><Timestamp time={props.timeStamp} /></p1>
</div>
)
}

export default TimelineEvent;
export default TimelineEvent;



3 changes: 2 additions & 1 deletion src/components/Timestamp.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ const Timestamp = (props) => {
);
};

export default Timestamp;
export default Timestamp;