Skip to content

Commit 3e45a78

Browse files
committed
style(text): prettify
1 parent 0c8b42a commit 3e45a78

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

src/components/Text.tsx

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,41 +15,40 @@ export const Text = (props: TextProps) => {
1515
return <TextElement as={variant} {...props} />;
1616
};
1717

18-
1918
const variantMapping = {
2019
h1: {
2120
fontSize: "2em",
22-
fontWeight: 700
21+
fontWeight: 700,
2322
},
2423
h2: {
2524
fontSize: "1.5em",
26-
fontWeight: 600
25+
fontWeight: 600,
2726
},
2827
h3: {
2928
fontSize: "1.17em",
30-
fontWeight: 600
29+
fontWeight: 600,
3130
},
3231
h4: {
3332
fontSize: "1em",
34-
fontWeight: 500
33+
fontWeight: 500,
3534
},
3635
h5: {
3736
fontSize: "0.83em",
38-
fontWeight: 500
37+
fontWeight: 500,
3938
},
4039
h6: {
4140
fontSize: "0.67em",
42-
fontWeight: 500
41+
fontWeight: 500,
4342
},
4443
p: {
4544
fontSize: "1em",
46-
fontWeight: 400
47-
}
45+
fontWeight: 400,
46+
},
4847
};
4948

5049
const TextElement = styled.p<TextProps>`
51-
font-family: "Poppins", sans-serif;
52-
font-weight: ${(props) => variantMapping[props.variant ?? "p"].fontWeight};
53-
font-size: ${(props) => variantMapping[props.variant ?? "p"].fontSize};
54-
color: ${(props) => props.theme.text};
55-
`;
50+
font-family: "Poppins", sans-serif;
51+
font-weight: ${(props) => variantMapping[props.variant ?? "p"].fontWeight};
52+
font-size: ${(props) => variantMapping[props.variant ?? "p"].fontSize};
53+
color: ${(props) => props.theme.text};
54+
`;

0 commit comments

Comments
 (0)