forked from rutgersesports/rutgersesports.club
-
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.
- Loading branch information
1 parent
4e96304
commit 8696b73
Showing
5 changed files
with
61 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { XMarkIcon } from '@heroicons/react/24/solid' | ||
import React, { useState } from 'react' | ||
|
||
interface IAlertBanner { | ||
msg: string | ||
} | ||
|
||
export default function AlertBanner(props: IAlertBanner) { | ||
const [isHidden, setHidden] = useState<boolean>(false) | ||
|
||
function changeVisibility() { | ||
setHidden(!isHidden) | ||
} | ||
|
||
return ( | ||
<div | ||
style={{ | ||
backgroundColor: '#d62929', | ||
paddingLeft: '20px', | ||
paddingRight: '20px', | ||
paddingBottom: '25px', | ||
paddingTop: '25px', | ||
color: 'white', | ||
borderColor: 'white', | ||
borderStyle: 'solid', | ||
borderLeft: 0, | ||
borderRight: 0, | ||
borderTop: 0, | ||
borderWidth: '1px', | ||
display: `${isHidden ? 'none' : 'flex'}`, | ||
justifyContent: 'center', | ||
alignContent: 'center', | ||
position: 'relative', | ||
}} | ||
> | ||
<p style={{ margin: 0 }}>{props.msg}</p> | ||
<div onClick={changeVisibility} style={{ position: 'absolute', right: 0, paddingRight: '20px' }}> | ||
<XMarkIcon style={{ width: '25px', height: '25px' }} /> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/* | ||
* Set the variable constant to `null` if you want to no longer show a message. | ||
*/ | ||
|
||
export const alertMessage: string = | ||
'The Esports Center on Busch Campus is closed until further notice. We apologize for the inconvenience.' |
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