Skip to content

Commit a1a3331

Browse files
committed
chore: style buttons
1 parent 6d19b4f commit a1a3331

File tree

2 files changed

+48
-49
lines changed

2 files changed

+48
-49
lines changed

.idea/workspace.xml

Lines changed: 31 additions & 32 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/ToolHeader.tsx

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
1-
import { Box, Button } from '@mui/material';
1+
import { Box, Button, styled, useTheme } from '@mui/material';
22
import Typography from '@mui/material/Typography';
33
import ToolBreadcrumb from './ToolBreadcrumb';
44
import { capitalizeFirstLetter } from '../utils/string';
55
import Grid from '@mui/material/Grid';
66
import { Icon, IconifyIcon } from '@iconify/react';
77
import { 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+
917
interface ToolHeaderProps {
1018
title: string;
1119
description: string;
@@ -14,37 +22,29 @@ interface ToolHeaderProps {
1422
}
1523

1624
function 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

Comments
 (0)