This repository has been archived by the owner on Sep 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
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 #106 from smswithoutborders/dev
added banner to infor of rebrand
- Loading branch information
Showing
5 changed files
with
47 additions
and
11,056 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import React, { useState } from "react"; | ||
import { Box, Typography, IconButton } from "@mui/material"; | ||
import CloseIcon from "@mui/icons-material/Close"; | ||
|
||
const MyAlert = () => { | ||
const [visible, setVisible] = useState(true); | ||
|
||
const handleClose = () => { | ||
setVisible(false); | ||
}; | ||
|
||
return visible ? ( | ||
<Box | ||
sx={{ | ||
position: "sticky", | ||
top: 0, | ||
backgroundColor: "#f50057", // Adjust the color as needed | ||
color: "white", | ||
padding: "8px 16px", | ||
textAlign: "center", | ||
zIndex: 1000, // Ensure it stays above other elements | ||
}} | ||
> | ||
<Typography variant="body1" component="span"> | ||
This is an important announcement! | ||
</Typography> | ||
<IconButton | ||
size="small" | ||
onClick={handleClose} | ||
sx={{ color: "white", marginLeft: "8px" }} | ||
> | ||
<CloseIcon /> | ||
</IconButton> | ||
</Box> | ||
) : null; | ||
}; | ||
|
||
export default MyAlert; |
Oops, something went wrong.