Skip to content

Commit 48ac746

Browse files
authored
Update Heading CSS modules to not collide (#1354)
1 parent 8b68f22 commit 48ac746

File tree

2 files changed

+22
-22
lines changed

2 files changed

+22
-22
lines changed

src/Heading/Heading.module.css

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
1-
.large {
1+
.sizeLarge {
22
font: var(--synth-font-heading-large);
33
}
44

5-
.medium {
5+
.sizeMedium {
66
font: var(--synth-font-heading-medium);
77
}
88

9-
.small {
9+
.sizeSmall {
1010
font: var(--synth-font-heading-small);
1111
}
1212

13-
.text {
13+
.sizeText {
1414
font: var(--synth-font-body-bold);
1515
}
1616

17-
.subtext {
17+
.sizeSubtext {
1818
font: var(--synth-font-subtext-bold);
1919
}
2020

21-
.bold {
21+
.weightBold {
2222
font-weight: var(--synth-font-weight-bold);
2323
}
2424

25-
.medium {
25+
.weightMedium {
2626
font-weight: var(--synth-font-weight-medium);
2727
}
2828

29-
.regular {
29+
.weightRegular {
3030
font-weight: var(--synth-font-weight-regular);
3131
}

src/Heading/Heading.tsx

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -36,27 +36,27 @@ export interface HeadingProps {
3636
}
3737

3838
const SIZE_CLASSES = {
39-
[HeadingSize.LARGE]: styles.large,
40-
[HeadingSize.MEDIUM]: styles.medium,
41-
[HeadingSize.SMALL]: styles.small,
42-
[HeadingSize.TEXT]: styles.text,
43-
[HeadingSize.SUBTEXT]: styles.subtext,
39+
[HeadingSize.LARGE]: styles.sizeLarge,
40+
[HeadingSize.MEDIUM]: styles.sizeMedium,
41+
[HeadingSize.SMALL]: styles.sizeSmall,
42+
[HeadingSize.TEXT]: styles.sizeText,
43+
[HeadingSize.SUBTEXT]: styles.sizeSubtext,
4444
} as const;
4545

4646
/* TODO Remove this? */
4747
const LEVEL_CLASSES = {
48-
1: styles.large,
49-
2: styles.medium,
50-
3: styles.medium, // This should be small?
51-
4: styles.small,
52-
5: styles.text,
53-
6: styles.subtext,
48+
1: styles.sizeLarge,
49+
2: styles.sizeMedium,
50+
3: styles.sizeMedium, // This should be small?
51+
4: styles.sizeSmall,
52+
5: styles.sizeText,
53+
6: styles.sizeSubtext,
5454
} as const;
5555

5656
const WEIGHT_CLASSES = {
57-
bold: styles.bold,
58-
regular: styles.regular,
59-
medium: styles.medium,
57+
bold: styles.weightBold,
58+
regular: styles.weightRegular,
59+
medium: styles.weightMedium,
6060
} as const;
6161

6262
export function Heading({

0 commit comments

Comments
 (0)