Skip to content

Commit b10205b

Browse files
committed
refactor: Remove unused useWindowSize hook and improve StyledSubtitle prop typing.
1 parent db92d81 commit b10205b

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

src/views/Home/components/HomeWTC/Style.Home.tsx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ const images = [
1414
"/images/wtc-gemini-3.webp",
1515
];
1616

17+
interface StyledSubtitleProps {
18+
color?: string;
19+
fontWeight?: number;
20+
shadow?: boolean;
21+
}
22+
1723
export const StyledHomeImage = styled.div`
1824
padding: 70px 0 40px;
1925
background-image:
@@ -64,12 +70,12 @@ export const StyledTitle = styled(motion.h1)`
6470
font-family: "Square 721 Regular", sans-serif;
6571
`;
6672

67-
export const StyledSubtitle = styled(motion.h2)`
68-
color: ${(props: { color: string }) => props.color ?? Color.WHITE};
73+
export const StyledSubtitle = styled(motion.h2) <StyledSubtitleProps>`
74+
color: ${(props) => props.color ?? Color.WHITE};
6975
font-family: "DejaVu Sans ExtraLight", sans-serif;
7076
font-size: 1.25rem;
71-
font-weight: ${(props: { fontWeight: number }) => props.fontWeight ?? 400};
72-
text-shadow: ${(props: { shadow: boolean }) => props.shadow ? '2px 2px 2px rgba(0, 0, 0, 0.5)' : 'none'};
77+
font-weight: ${(props) => props.fontWeight ?? 400};
78+
text-shadow: ${(props) => props.shadow ? '2px 2px 2px rgba(0, 0, 0, 0.5)' : 'none'};
7379
7480
padding: 0.25rem;
7581

0 commit comments

Comments
 (0)