Skip to content

Commit a931f57

Browse files
committed
feat(#3622): add hover on home cards
1 parent 9a2f971 commit a931f57

File tree

4 files changed

+13
-3
lines changed

4 files changed

+13
-3
lines changed

govtool/frontend/src/components/molecules/HomeCard.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,24 @@ export const HomeCard = ({ title, description, onCardClick }: Props) => (
2323
"&:focus": {
2424
boxShadow: "0 0 0 3px rgba(47, 98, 220, 0.5)",
2525
},
26+
"&:hover": {
27+
boxShadow: onCardClick
28+
? "0 0 0 3px rgba(47, 98, 220, 0.5)"
29+
: "2px 2px 20px 0px rgba(47, 98, 220, 0.20)",
30+
},
31+
backgroundColor: "white",
2632
}}
2733
onCardClick={onCardClick}
2834
component="button"
2935
role="button"
3036
aria-label={`${title}. ${description}`}
3137
dataTestId={`home-card-${title.replace(/\s+/g, "-").toLowerCase()}`}
3238
>
33-
<Typography component="h3" variant="titleH3">
39+
<Typography component="h3" variant="titleH3" sx={{ textAlign: "left" }}>
3440
{title}
3541
</Typography>
36-
<Typography variant="body">{description}</Typography>
42+
<Typography variant="body" sx={{ textAlign: "left" }}>
43+
{description}
44+
</Typography>
3745
</Card>
3846
);

govtool/frontend/src/components/organisms/Home/OpenToAny.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export const OpenToAny = () => {
8787
component="section"
8888
data-testid="open-to-any-and-all-users-section"
8989
>
90-
<Typography variant="title">
90+
<Typography variant="title" component="h2">
9191
{t("home.openToAny.section.title")}
9292
</Typography>
9393
<Box

govtool/frontend/src/components/organisms/Home/UsefulLinks.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ export const UsefulLinks = ({ align = "left" }: Props) => {
8787
display: "flex",
8888
flexDirection: "column",
8989
gap: 1,
90+
backgroundColor: "white",
9091
}}
9192
>
9293
<Typography component="h3" variant="titleH3">

govtool/frontend/src/pages/Home.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ export const Home = () => {
4848
whiteSpace: "pre-line",
4949
}}
5050
variant="title"
51+
component="h1"
5152
>
5253
<Trans
5354
i18nKey="hero.description"

0 commit comments

Comments
 (0)