Skip to content

Commit 5057cc3

Browse files
committed
update courseoptions column
1 parent 4e9360b commit 5057cc3

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed
Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,27 @@
1-
import type { ReactNode } from 'react'
2-
import { Button } from '@mui/material'
1+
import { useState, type ReactNode } from 'react'
2+
import { Typography } from '@mui/material'
3+
import { Link } from 'react-router-dom'
34

45
export default function CourseOption({ children, link }: { children: ReactNode; link: string }) {
6+
const [isHovered, setIsHovered] = useState<boolean>(false)
7+
58
return (
6-
<Button
7-
variant="text"
8-
fullWidth
9+
<Typography
910
sx={{
10-
justifyContent: 'flex-start',
11+
backgroundColor: isHovered ? '#efefef' : 'transparent',
1112
color: 'black',
1213
cursor: 'pointer',
1314
borderRadius: '0.5rem',
14-
padding: '0.4rem 1rem',
15+
padding: '0.5rem 1rem',
1516
transitionDuration: '200ms',
16-
textTransform: 'none',
17+
textDecoration: 'none',
1718
}}
18-
href={link}
19+
onMouseEnter={() => setIsHovered(true)}
20+
onMouseLeave={() => setIsHovered(false)}
1921
>
20-
{children}
21-
</Button>
22+
<Link style={{ textDecoration: 'none', textTransform: 'none' }} to={link}>
23+
{children}
24+
</Link>
25+
</Typography>
2226
)
2327
}

0 commit comments

Comments
 (0)