-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #38 from lucashicks1/react-ui
center the mf divs !!!!!!!!!! grrrrr
- Loading branch information
Showing
7 changed files
with
162 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
build/ui-display/frontend-app/src/components/widgets/SuggestedActivityWidget.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
// import React from "react"; | ||
|
||
// export default function ClockWidget() { | ||
// const Activities = ({ weatherCondition }) => { | ||
|
||
// const weatherActivities = { | ||
// 'Thunderstorm': 'movie marathon', | ||
// 'Drizzle': 'bake off', | ||
// 'Rain': 'trip to the library', | ||
// 'Clear': 'picnic', | ||
// 'Clouds': 'game of Catan' | ||
// }; | ||
|
||
// const weather = 'Clear'; | ||
// const activity = weatherActivities[weather] || 'movie'; | ||
// } | ||
|
||
|
||
|
||
// return ( | ||
// <div> | ||
// <h1>It's looking {weatherCondition} today, how about a {activity}?</h1> | ||
// </div> | ||
// ); | ||
// } | ||
|
||
import React from 'react'; | ||
|
||
const weatherActivities = { | ||
'Thunderstorm': 'movie marathon', | ||
'Drizzle': 'bake off', | ||
'Rain': 'trip to the library', | ||
'Clear': 'picnic', | ||
'Clouds': 'game of Catan' | ||
}; | ||
|
||
const Activities = ({ weatherCondition }) => { | ||
// hard code this value for now | ||
if (!weatherCondition) { | ||
weatherCondition = 'Clear'; | ||
} | ||
// Get the corresponding activity based on the weatherCondition | ||
const activity = weatherActivities[weatherCondition] || 'movie'; | ||
|
||
return ( | ||
<div> | ||
<h1>It's looking {weatherCondition} today, how about a {activity}?</h1> | ||
</div> | ||
); | ||
} | ||
|
||
export default Activities; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 17 additions & 3 deletions
20
build/ui-display/frontend-app/src/components/widgets/Widgets.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,28 @@ | ||
@import "../../App.css"; | ||
|
||
.Clock-box { | ||
background-color: var(--purple); | ||
background-color: var(--cream); | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
font-size: calc(10px + 2vmin); | ||
color: white; | ||
height: 20%; | ||
color: var(--darkgrey); | ||
border-radius: 20px; | ||
margin-top: 200px; | ||
margin-top: 0%; | ||
text-shadow: 0 2px 2px var(--darkgrey); | ||
} | ||
|
||
.Date-box { | ||
border-radius: 20px; | ||
margin-bottom: 0%; | ||
height: 5%; | ||
display: flex; | ||
width: 100%; | ||
align-items: center; | ||
justify-content: center; | ||
font-size: calc(5px + 2vmin); | ||
background-color: var(--cream); | ||
|
||
} |