Skip to content
This repository was archived by the owner on Aug 18, 2023. It is now read-only.

Commit d9ea473

Browse files
committed
use theme properties in styled components
1 parent 7bf7250 commit d9ea473

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

components/Card.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const StyledCard = styled.div`
2929
bottom: 0;
3030
left: 0;
3131
right: 0;
32-
background-color: darkmagenta;
32+
background-color: ${({ theme }) => theme.colors.primary.main};
3333
clip-path: polygon(0 0, 100% 0%, 100% 64%, 0 90%);
3434
z-index: -1;
3535
}
@@ -39,7 +39,7 @@ const StyledCard = styled.div`
3939
}
4040
li {
4141
color: #fff;
42-
font-size: 14px;
42+
font-size: ${({ theme }) => theme.typography.fontSize};
4343
list-style: none;
4444
margin-bottom: 8px;
4545
&::before {
@@ -51,8 +51,8 @@ const StyledCard = styled.div`
5151

5252
const CardTitle = styled.h4`
5353
color: #fff;
54-
font-size: 20px;
55-
font-weight: 600;
54+
font-size: ${({ theme }) => theme.typography.heading3.fontSize};
55+
font-weight: ${({ theme }) => theme.typography.fontWeightBold};
5656
text-align: center;
5757
margin-top: 0;
5858
`;

0 commit comments

Comments
 (0)