-
Notifications
You must be signed in to change notification settings - Fork 4
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 #599 from pennlabs/alert-plan-integration
Alert plan integration
- Loading branch information
Showing
24 changed files
with
2,907 additions
and
2,178 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
/**/old/* | ||
node_modules/ | ||
next.config.js | ||
_document.js | ||
**/*.json | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import styled from "styled-components"; | ||
|
||
interface AlertButtonProps { | ||
alerts?: { | ||
add: () => void; | ||
remove: () => void; | ||
} | ||
inAlerts: boolean; | ||
} | ||
|
||
const Button = styled.button` | ||
color: gray; | ||
padding: 0; | ||
border: none; | ||
background: none; | ||
&:hover { | ||
cursor: pointer; | ||
color: #669afb; | ||
} | ||
`; | ||
|
||
const AlertButton: React.FC<AlertButtonProps> = ({ alerts, inAlerts }) => { | ||
return( | ||
<Button | ||
role="button" | ||
onClick={(event) => { | ||
event.stopPropagation(); | ||
if(inAlerts) { | ||
alerts?.remove(); | ||
} else { | ||
alerts?.add(); | ||
} | ||
}} | ||
> | ||
<i | ||
style={{ fontSize: "1rem" }} | ||
className={inAlerts ? "fas fa-bell": "far fa-bell"} | ||
/> | ||
</Button> | ||
) | ||
} | ||
|
||
export default AlertButton; |
Oops, something went wrong.