feat: Add theme switch in login page
This commit is contained in:
1 parent
a97b2f0887
commit
3ab8b1241e
1 file changed
+23
-26
@@ -17,6 +17,7 @@ import ArrowBackRoundedIcon from "@mui/icons-material/ArrowBackRounded";
|
|||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
import { logger } from "../../Utils/Logger";
|
import { logger } from "../../Utils/Logger";
|
||||||
import "./index.css";
|
import "./index.css";
|
||||||
|
import ThemeSwitch from "../../Components/ThemeSwitch";
|
||||||
const DEMO = import.meta.env.VITE_APP_DEMO;
|
const DEMO = import.meta.env.VITE_APP_DEMO;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -327,33 +328,25 @@ const StepTwo = ({ form, errors, onSubmit, onChange, onBack }) => {
|
|||||||
</LoadingButton>
|
</LoadingButton>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Box>
|
</Box>
|
||||||
<Box
|
|
||||||
textAlign="center"
|
|
||||||
sx={{
|
|
||||||
position: "absolute",
|
|
||||||
bottom: 0,
|
|
||||||
left: "50%",
|
|
||||||
transform: `translate(-50%, 150%)`,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Typography
|
|
||||||
className="forgot-p"
|
|
||||||
display="inline-block"
|
|
||||||
color={theme.palette.primary.main}
|
|
||||||
>
|
|
||||||
Forgot password?
|
|
||||||
</Typography>
|
|
||||||
<Typography
|
|
||||||
component="span"
|
|
||||||
color={theme.palette.primary.main}
|
|
||||||
ml={theme.spacing(2)}
|
|
||||||
sx={{ userSelect: "none" }}
|
|
||||||
onClick={handleNavigate}
|
|
||||||
>
|
|
||||||
Reset password
|
|
||||||
</Typography>
|
|
||||||
</Box>
|
|
||||||
</Stack>
|
</Stack>
|
||||||
|
<Box textAlign="center">
|
||||||
|
<Typography
|
||||||
|
className="forgot-p"
|
||||||
|
display="inline-block"
|
||||||
|
color={theme.palette.primary.main}
|
||||||
|
>
|
||||||
|
Forgot password?
|
||||||
|
</Typography>
|
||||||
|
<Typography
|
||||||
|
component="span"
|
||||||
|
color={theme.palette.primary.main}
|
||||||
|
ml={theme.spacing(2)}
|
||||||
|
sx={{ userSelect: "none" }}
|
||||||
|
onClick={handleNavigate}
|
||||||
|
>
|
||||||
|
Reset password
|
||||||
|
</Typography>
|
||||||
|
</Box>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
@@ -520,6 +513,7 @@ const Login = () => {
|
|||||||
px={{ xs: theme.spacing(12), lg: theme.spacing(20) }}
|
px={{ xs: theme.spacing(12), lg: theme.spacing(20) }}
|
||||||
pb={theme.spacing(20)}
|
pb={theme.spacing(20)}
|
||||||
mx="auto"
|
mx="auto"
|
||||||
|
gap={theme.spacing(8)}
|
||||||
sx={{
|
sx={{
|
||||||
"& > .MuiStack-root": {
|
"& > .MuiStack-root": {
|
||||||
border: 1,
|
border: 1,
|
||||||
@@ -554,6 +548,9 @@ const Login = () => {
|
|||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
)}
|
)}
|
||||||
|
<Box sx={{ marginX: "auto"}}>
|
||||||
|
<ThemeSwitch />
|
||||||
|
</Box>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in new issue
Block a user