Skip to content

Commit

Permalink
refactor: make lit-plugin happy
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
lishaduck committed Oct 20, 2024
1 parent eb3fc0b commit eff0bb7
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/components/Carousel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function createCarouselStyles(number: number): string {
}
`;

const delays = Array.from({ length: number })
const delayList = Array.from({ length: number })
.map((_, i) => {
return css`
&:nth-child(${i + 1}) {
Expand All @@ -73,6 +73,10 @@ function createCarouselStyles(number: number): string {
`;
})
.join("\n");
const delays = css`
.carousel > img {
${delayList}
}`;

return css`
.carousel > img {
Expand All @@ -88,9 +92,7 @@ function createCarouselStyles(number: number): string {
}
}
.carousel > img {
${delays}
}
${delays}
${keyframes}
`;
Expand Down

0 comments on commit eff0bb7

Please sign in to comment.