diff --git a/src/App.css b/src/App.css index e20270c..5004919 100644 --- a/src/App.css +++ b/src/App.css @@ -4,6 +4,9 @@ color: white; position: fixed; width: 100%; + display: flex; + justify-content: center; + align-items: center; } .App-title { @@ -15,3 +18,8 @@ padding-top: 7rem; background-color: #E6ECF0; } + +.logo { + max-width: 60px; + padding-right: 20px; +} \ No newline at end of file diff --git a/src/App.js b/src/App.js index 76d86d2..4afcb9b 100644 --- a/src/App.js +++ b/src/App.js @@ -5,18 +5,18 @@ import timelineData from './data/timeline.json'; import Timeline from './components/Timeline'; function App() { - console.log(timelineData); - // Customize the code below return (
-

Application title

+ React logo decoration +

{timelineData.person}'s Social Media Feed

+
); } -export default App; +export default App; \ No newline at end of file diff --git a/src/components/Timeline.css b/src/components/Timeline.css index e31f946..daccff5 100644 --- a/src/components/Timeline.css +++ b/src/components/Timeline.css @@ -1,5 +1,5 @@ .timeline { - width: 30%; + width: 45%; margin: auto; text-align: left; -} +} \ No newline at end of file diff --git a/src/components/Timeline.js b/src/components/Timeline.js index 463eb3e..231ab8b 100644 --- a/src/components/Timeline.js +++ b/src/components/Timeline.js @@ -2,9 +2,26 @@ import React from 'react'; import './Timeline.css'; import TimelineEvent from './TimelineEvent'; -const Timeline = () => { + +const Timeline = (props) => { + + // map over event props to return TimelineEvent components for each element + const timelineEventComponents = props.events.map((event) => { + return ( + + ); + }); - return; + return ( + + ) } export default Timeline; \ No newline at end of file diff --git a/src/components/TimelineEvent.css b/src/components/TimelineEvent.css index ea6407a..6f76327 100644 --- a/src/components/TimelineEvent.css +++ b/src/components/TimelineEvent.css @@ -18,10 +18,11 @@ .event-status { grid-area: 2 / 1 / span 1 / -1; + word-wrap: break-word; } .event-time { grid-area: 1 / 2 / span 1 / span 1; margin-top: 0.5rem; text-align: right; -} +} \ No newline at end of file diff --git a/src/components/TimelineEvent.js b/src/components/TimelineEvent.js index cc476c2..0fee51c 100644 --- a/src/components/TimelineEvent.js +++ b/src/components/TimelineEvent.js @@ -2,9 +2,15 @@ import React from 'react'; import './TimelineEvent.css'; import Timestamp from './Timestamp'; -const TimelineEvent = () => { - - return; +const TimelineEvent = (props) => { + + return ( +
+

{props.person}

+

+

{props.status}

+
+ ) } export default TimelineEvent; \ No newline at end of file