-
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 #12 from OpenUpSA/feature/data-sources-modal
Data sources modal
- Loading branch information
Showing
5 changed files
with
267 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
.modalCard { | ||
position: relative; | ||
max-width: 515px; | ||
outline: none; | ||
box-shadow: 0px 4px 8px 3px #00000026; | ||
border-radius: 12px !important; | ||
|
||
@media (max-width: 1325px) { | ||
width: 100vw; | ||
height: 100vh; | ||
border-radius: 0 !important; | ||
} | ||
|
||
.media { | ||
background-color: #000; | ||
height: 205px; | ||
} | ||
|
||
.content { | ||
padding: 1.5em 1.5em 0 1.5em; | ||
|
||
.title { | ||
font-size: 22px; | ||
font-weight: 400; | ||
line-height: 28px; | ||
margin-bottom: 0em; | ||
} | ||
|
||
p { | ||
font-size: 14px; | ||
font-weight: 400; | ||
line-height: 18px; | ||
} | ||
} | ||
|
||
.actions { | ||
padding: 1em 1.5em; | ||
} | ||
|
||
button.primary, | ||
.button.secondary { | ||
cursor: pointer; | ||
border-radius: 100px; | ||
background: #ffcb14; | ||
font-size: 14px; | ||
font-weight: 500; | ||
line-height: 40px; | ||
letter-spacing: 0.10000000149011612px; | ||
text-align: center; | ||
color: #000; | ||
padding: 0 2em; | ||
text-transform: none; | ||
align-items: center; | ||
display: flex; | ||
text-decoration: none; | ||
|
||
@media (max-width: 1325px) { | ||
font-size: 12px; | ||
} | ||
|
||
&:hover { | ||
background: #ffdb24; | ||
} | ||
|
||
svg { | ||
margin-right: 0.5em; | ||
} | ||
} | ||
|
||
.button.secondary { | ||
background: #faf4e0; | ||
|
||
&:hover { | ||
background: #eae4d0; | ||
} | ||
} | ||
|
||
button.closeDatasourcesModalButton { | ||
cursor: pointer; | ||
color: #333; | ||
text-align: right !important; | ||
background-color: #efefef; | ||
border-radius: 8px; | ||
padding: 0; | ||
margin: 0 0 0 auto; | ||
display: flex; | ||
width: 44px; | ||
height: 44px; | ||
border: none; | ||
justify-content: center; | ||
align-items: center; | ||
font-size: 24px; | ||
&:hover { | ||
color: #000; | ||
background: #dfdfdf; | ||
} | ||
} | ||
} | ||
|
||
.tabularList { | ||
list-style: none; | ||
font-size: 12px; | ||
li { | ||
border-bottom: 1px solid #eee; | ||
padding: 1em 0 1em 0; | ||
|
||
&:last-child { | ||
border-bottom: none; | ||
} | ||
|
||
a { | ||
text-decoration: none; | ||
color: #666; | ||
|
||
&:hover { | ||
text-decoration: underline; | ||
color: #000; | ||
} | ||
} | ||
} | ||
} |
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,99 @@ | ||
import "./index.scss"; | ||
|
||
import { Modal } from "@mui/material"; | ||
import Card from "@mui/material/Card"; | ||
import CardContent from "@mui/material/CardContent"; | ||
import Typography from "@mui/material/Typography"; | ||
import Stack from "@mui/material/Stack"; | ||
|
||
import CloseIcon from "@mui/icons-material/Close"; | ||
import StorageRounded from "@mui/icons-material/StorageRounded"; | ||
|
||
type Props = { | ||
dataSourcesModalOpen: boolean; | ||
closeDataSourcesModal: Function; | ||
}; | ||
|
||
export function DataSourcesModal({ | ||
dataSourcesModalOpen, | ||
closeDataSourcesModal, | ||
}: Props) { | ||
return ( | ||
<Modal | ||
open={dataSourcesModalOpen} | ||
onClose={() => closeDataSourcesModal()} | ||
style={{ | ||
display: "flex", | ||
alignItems: "center", | ||
justifyContent: "center", | ||
}} | ||
> | ||
<Card className="modalCard"> | ||
<CardContent className="content"> | ||
<Stack | ||
alignItems="center" | ||
direction="row" | ||
gap={2} | ||
style={{ marginBottom: "1em" }} | ||
> | ||
<StorageRounded /> | ||
<Typography | ||
gutterBottom | ||
variant="h5" | ||
component="h1" | ||
className="title" | ||
> | ||
Data sources | ||
</Typography> | ||
<button | ||
className="closeDatasourcesModalButton" | ||
onClick={() => closeDataSourcesModal()} | ||
> | ||
<CloseIcon fontSize="medium" /> | ||
</button> | ||
</Stack> | ||
<ul className="tabularList"> | ||
<li> | ||
<a | ||
href="https://www.opensecrets.org.za/report-who-has-the-power/" | ||
target="_blank" | ||
rel="noreferrer" | ||
> | ||
Who Has the Power: South Africa’s Energy Profiteers | ||
</a> | ||
</li> | ||
<li> | ||
<a | ||
href="https://globalenergymonitor.org/projects/global-coal-plant-tracker/" | ||
target="_blank" | ||
rel="noreferrer" | ||
> | ||
Global Coal Plant Tracker, Global Energy Monitor, April 2024 | ||
Supplemental release. | ||
</a> | ||
</li> | ||
<li> | ||
<a | ||
href="https://globalenergymonitor.org/projects/global-methane-emitters-tracker/" | ||
target="_blank" | ||
rel="noreferrer" | ||
> | ||
Global Methane Emitters Tracker, Global Energy Monitor, November | ||
2023 release. | ||
</a> | ||
</li> | ||
<li> | ||
<a | ||
href="https://globalenergymonitor.org/" | ||
target="_blank" | ||
rel="noreferrer" | ||
> | ||
Global Energy Monitor | ||
</a> | ||
</li> | ||
</ul> | ||
</CardContent> | ||
</Card> | ||
</Modal> | ||
); | ||
} |
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