add theme switcher
This commit is contained in:
1 parent
831cf8cde5
commit
d88ebdaff3
1 file changed
+14
-2
@@ -2,7 +2,7 @@
|
|||||||
import { Box, Stack, Typography, Button } from "@mui/material";
|
import { Box, Stack, Typography, Button } from "@mui/material";
|
||||||
import Image from "../../../../../Components/Image";
|
import Image from "../../../../../Components/Image";
|
||||||
import SettingsIcon from "../../../../../assets/icons/settings-bold.svg?react";
|
import SettingsIcon from "../../../../../assets/icons/settings-bold.svg?react";
|
||||||
|
import ThemeSwitch from "../../../../../Components/ThemeSwitch";
|
||||||
//Utils
|
//Utils
|
||||||
import { useTheme } from "@mui/material/styles";
|
import { useTheme } from "@mui/material/styles";
|
||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
@@ -76,6 +76,7 @@ Controls.propTypes = {
|
|||||||
|
|
||||||
const ControlsHeader = ({
|
const ControlsHeader = ({
|
||||||
statusPage,
|
statusPage,
|
||||||
|
isPublic,
|
||||||
isDeleting,
|
isDeleting,
|
||||||
isDeleteOpen,
|
isDeleteOpen,
|
||||||
setIsDeleteOpen,
|
setIsDeleteOpen,
|
||||||
@@ -105,7 +106,16 @@ const ControlsHeader = ({
|
|||||||
maxHeight={"50px"}
|
maxHeight={"50px"}
|
||||||
base64={statusPage?.logo?.data}
|
base64={statusPage?.logo?.data}
|
||||||
/>
|
/>
|
||||||
<Typography variant="h1">{statusPage?.companyName}</Typography>
|
<Typography
|
||||||
|
variant="h1"
|
||||||
|
overflow="hidden"
|
||||||
|
textOverflow="ellipsis"
|
||||||
|
sx={{
|
||||||
|
maxWidth: { xs: "200px", sm: "100%" },
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{statusPage?.companyName}
|
||||||
|
</Typography>
|
||||||
</Stack>
|
</Stack>
|
||||||
<Controls
|
<Controls
|
||||||
isDeleting={isDeleting}
|
isDeleting={isDeleting}
|
||||||
@@ -114,6 +124,7 @@ const ControlsHeader = ({
|
|||||||
url={url}
|
url={url}
|
||||||
type={type}
|
type={type}
|
||||||
/>
|
/>
|
||||||
|
{isPublic && <ThemeSwitch />}
|
||||||
</Stack>
|
</Stack>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
@@ -121,6 +132,7 @@ const ControlsHeader = ({
|
|||||||
ControlsHeader.propTypes = {
|
ControlsHeader.propTypes = {
|
||||||
url: PropTypes.string,
|
url: PropTypes.string,
|
||||||
statusPage: PropTypes.object,
|
statusPage: PropTypes.object,
|
||||||
|
isPublic: PropTypes.bool,
|
||||||
isDeleting: PropTypes.bool,
|
isDeleting: PropTypes.bool,
|
||||||
isDeleteOpen: PropTypes.bool.isRequired,
|
isDeleteOpen: PropTypes.bool.isRequired,
|
||||||
setIsDeleteOpen: PropTypes.func.isRequired,
|
setIsDeleteOpen: PropTypes.func.isRequired,
|
||||||
|
|||||||
Reference in new issue
Block a user