File tree Expand file tree Collapse file tree 1 file changed +15
-11
lines changed
src/client/components/ChatV2/generics Expand file tree Collapse file tree 1 file changed +15
-11
lines changed Original file line number Diff line number Diff line change 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'
3
4
4
5
export default function CourseOption ( { children, link } : { children : ReactNode ; link : string } ) {
6
+ const [ isHovered , setIsHovered ] = useState < boolean > ( false )
7
+
5
8
return (
6
- < Button
7
- variant = "text"
8
- fullWidth
9
+ < Typography
9
10
sx = { {
10
- justifyContent : 'flex-start ',
11
+ backgroundColor : isHovered ? '#efefef' : 'transparent ',
11
12
color : 'black' ,
12
13
cursor : 'pointer' ,
13
14
borderRadius : '0.5rem' ,
14
- padding : '0.4rem 1rem' ,
15
+ padding : '0.5rem 1rem' ,
15
16
transitionDuration : '200ms' ,
16
- textTransform : 'none' ,
17
+ textDecoration : 'none' ,
17
18
} }
18
- href = { link }
19
+ onMouseEnter = { ( ) => setIsHovered ( true ) }
20
+ onMouseLeave = { ( ) => setIsHovered ( false ) }
19
21
>
20
- { children }
21
- </ Button >
22
+ < Link style = { { textDecoration : 'none' , textTransform : 'none' } } to = { link } >
23
+ { children }
24
+ </ Link >
25
+ </ Typography >
22
26
)
23
27
}
You can’t perform that action at this time.
0 commit comments