-
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.
Revert to old DataReturnWarning component.
- Loading branch information
Showing
4 changed files
with
98 additions
and
27 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,61 @@ | ||
$teal-dark: #177991; | ||
|
||
.data-return-warning-background { | ||
position: fixed; | ||
top: 0; | ||
left: 0; | ||
right: 0; | ||
bottom: 0; | ||
background-color: rgba(0, 0, 0, 0.51); | ||
} | ||
|
||
.data-return-warning { | ||
position: fixed; | ||
top: 5px; | ||
left: 15px; | ||
width: 340px; | ||
border-radius: 6px; | ||
padding: 0; | ||
background-color: #fff; | ||
z-index: 10; | ||
|
||
div:nth-child(1) { | ||
width: 100%; | ||
height: 25px; | ||
border-radius: 6px 6px 0 0; | ||
background-color: #ffbf00; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
color: #000; | ||
font-weight: bold; | ||
|
||
svg { | ||
position: absolute; | ||
right: 6px; | ||
cursor: pointer; | ||
} | ||
} | ||
div:nth-child(2) { | ||
padding: 10px; | ||
text-align: left; | ||
} | ||
div:nth-child(3) { | ||
display: flex; | ||
align-items: center; | ||
justify-content: right; | ||
padding: 0 10px 10px 0; | ||
|
||
button { | ||
width: 82px; | ||
height: 31px; | ||
border-radius: 3px; | ||
border: solid 1px #000; | ||
background-color: #fff; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
cursor: pointer; | ||
} | ||
} | ||
} |
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,32 @@ | ||
import React from "react"; | ||
import { useStateContext } from "../hooks/use-state"; | ||
import ExitIcon from "../assets/images/icon-exit.svg"; | ||
|
||
import "./data-return-warning.scss"; | ||
|
||
export const DataReturnWarning = () => { | ||
const {setState} = useStateContext(); | ||
|
||
const handleCloseModal = () => { | ||
setState(draft => { | ||
draft.showModal = undefined; | ||
}); | ||
}; | ||
|
||
return ( | ||
<> | ||
<div className="data-return-warning-background" onClick={handleCloseModal} /> | ||
<div className="data-return-warning"> | ||
<div> | ||
Data Return Warning <ExitIcon onClick={handleCloseModal} /> | ||
</div> | ||
<div> | ||
Your current date range is likely to return too many results, which may affect application performance. | ||
</div> | ||
<div> | ||
<button onClick={handleCloseModal}>Close</button> | ||
</div> | ||
</div> | ||
</> | ||
); | ||
}; |
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