Skip to content

Commit 54a30f4

Browse files
committed
refactor: make lit-plugin happy
My IDE gives errors with the current code, so I'm fixing it. It's not actually an issue, but I want to get rid of the red squigglies.
1 parent dc9671b commit 54a30f4

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/components/Carousel.tsx

+6-4
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ function createCarouselStyles(number: number): string {
6262
}
6363
`;
6464

65-
const delays = Array.from({ length: number })
65+
const delayList = Array.from({ length: number })
6666
.map((_, i) => {
6767
return css`
6868
&:nth-child(${i + 1}) {
@@ -73,6 +73,10 @@ function createCarouselStyles(number: number): string {
7373
`;
7474
})
7575
.join("\n");
76+
const delays = css`
77+
.carousel > img {
78+
${delayList}
79+
}`;
7680

7781
return css`
7882
.carousel > img {
@@ -88,9 +92,7 @@ function createCarouselStyles(number: number): string {
8892
}
8993
}
9094
91-
.carousel > img {
92-
${delays}
93-
}
95+
${delays}
9496
9597
${keyframes}
9698
`;

0 commit comments

Comments
 (0)