Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/pages/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import React from "react"
import Report from "../../themes/learning-management-system/learning-management-theme/src/component/report"
import UserDetail from "../../themes/learning-management-system/learning-management-theme/src/component/userDetail"

const ExamplePage = () => {
return (
return (<>
<UserDetail/>
<div
style={{
position: "absolute",
Expand All @@ -15,6 +18,7 @@ const ExamplePage = () => {
Start editing the 'pages/index.js' file to import and show component
</h3>
</div>
</>
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,17 @@ import Styles from "./styles"
import { useMediaQuery } from "@material-ui/core"

const UserDetail = () => {

const [isHovering, setIsHovering] = useState(false);

const handleMouseEnter = () => {
setIsHovering(true);
};

const handleMouseLeave = () => {
setIsHovering(false);
};

const classes = Styles()
const matchesMD = useMediaQuery(theme => theme.breakpoints.down("sm"))
const [inputValues, setInputValues] = useState({
Expand Down Expand Up @@ -97,7 +108,13 @@ const UserDetail = () => {
</Grid>
<Grid item container justifyContent="center">
<Grid item>
<Button onClick={() => {}} classes={{ root: classes.logoutBtnStyle }}>
<Button onClick={() => {}} classes={{ root: classes.logoutBtnStyle }}
style={{
backgroundColor: isHovering ? 'red' : '',
}}
onMouseEnter={handleMouseEnter}
onMouseLeave={handleMouseLeave}
>
<Typography variant="h6">Log out</Typography>
</Button>
</Grid>
Expand Down