1
- import { Box , Button } from '@mui/material' ;
1
+ import { Box , Button , styled , useTheme } from '@mui/material' ;
2
2
import Typography from '@mui/material/Typography' ;
3
3
import ToolBreadcrumb from './ToolBreadcrumb' ;
4
4
import { capitalizeFirstLetter } from '../utils/string' ;
5
5
import Grid from '@mui/material/Grid' ;
6
6
import { Icon , IconifyIcon } from '@iconify/react' ;
7
7
import { categoriesColors } from '../config/uiConfig' ;
8
8
9
+ const StyledButton = styled ( Button ) ( ( { theme } ) => ( {
10
+ backgroundColor : 'white' ,
11
+ '&:hover' : {
12
+ backgroundColor : theme . palette . primary . main ,
13
+ color : 'white'
14
+ }
15
+ } ) ) ;
16
+
9
17
interface ToolHeaderProps {
10
18
title : string ;
11
19
description : string ;
@@ -14,37 +22,29 @@ interface ToolHeaderProps {
14
22
}
15
23
16
24
function ToolLinks ( ) {
25
+ const theme = useTheme ( ) ;
26
+
17
27
return (
18
28
< Grid container spacing = { 2 } mt = { 1 } >
19
29
< Grid item md = { 12 } lg = { 4 } >
20
- < Button
30
+ < StyledButton
21
31
sx = { { backgroundColor : 'white' } }
22
32
fullWidth
23
33
variant = "outlined"
24
34
href = "#tool"
25
35
>
26
36
Use This Tool
27
- </ Button >
37
+ </ StyledButton >
28
38
</ Grid >
29
39
< Grid item md = { 12 } lg = { 4 } >
30
- < Button
31
- sx = { { backgroundColor : 'white' } }
32
- fullWidth
33
- variant = "outlined"
34
- href = "#examples"
35
- >
40
+ < StyledButton fullWidth variant = "outlined" href = "#examples" >
36
41
See Examples
37
- </ Button >
42
+ </ StyledButton >
38
43
</ Grid >
39
44
< Grid item md = { 12 } lg = { 4 } >
40
- < Button
41
- sx = { { backgroundColor : 'white' } }
42
- fullWidth
43
- variant = "outlined"
44
- href = "#tour"
45
- >
45
+ < StyledButton fullWidth variant = "outlined" href = "#tour" >
46
46
Learn How to Use
47
- </ Button >
47
+ </ StyledButton >
48
48
</ Grid >
49
49
</ Grid >
50
50
) ;
0 commit comments