1- import { Box , Button } from '@mui/material' ;
1+ import { Box , Button , styled , useTheme } from '@mui/material' ;
22import Typography from '@mui/material/Typography' ;
33import ToolBreadcrumb from './ToolBreadcrumb' ;
44import { capitalizeFirstLetter } from '../utils/string' ;
55import Grid from '@mui/material/Grid' ;
66import { Icon , IconifyIcon } from '@iconify/react' ;
77import { categoriesColors } from '../config/uiConfig' ;
88
9+ const StyledButton = styled ( Button ) ( ( { theme } ) => ( {
10+ backgroundColor : 'white' ,
11+ '&:hover' : {
12+ backgroundColor : theme . palette . primary . main ,
13+ color : 'white'
14+ }
15+ } ) ) ;
16+
917interface ToolHeaderProps {
1018 title : string ;
1119 description : string ;
@@ -14,37 +22,29 @@ interface ToolHeaderProps {
1422}
1523
1624function ToolLinks ( ) {
25+ const theme = useTheme ( ) ;
26+
1727 return (
1828 < Grid container spacing = { 2 } mt = { 1 } >
1929 < Grid item md = { 12 } lg = { 4 } >
20- < Button
30+ < StyledButton
2131 sx = { { backgroundColor : 'white' } }
2232 fullWidth
2333 variant = "outlined"
2434 href = "#tool"
2535 >
2636 Use This Tool
27- </ Button >
37+ </ StyledButton >
2838 </ Grid >
2939 < 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" >
3641 See Examples
37- </ Button >
42+ </ StyledButton >
3843 </ Grid >
3944 < 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" >
4646 Learn How to Use
47- </ Button >
47+ </ StyledButton >
4848 </ Grid >
4949 </ Grid >
5050 ) ;
0 commit comments