Skip to content
This repository has been archived by the owner on Apr 28, 2023. It is now read-only.

Commit

Permalink
refactor carousel story js
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenhmarsh committed Dec 27, 2021
1 parent edd1c33 commit 1c94352
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/carousel/carousel.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ import { useEffect } from "@storybook/client-api";
export default { title: "Carousel/Carousel" };

const mix = ["", CarouselSlide.args.video, CarouselSlide.args.video, "", "", "", "", "", "", "", "", "", "", "", CarouselSlide.args.video, CarouselSlide.args.video, CarouselSlide.args.video];
const slides = mix.map(video => CarouselSlide({ ...CarouselSlide.args, video })).join("\n");

export const Carousel = (args) => {
useEffect(() => { carousel(args); });

return html`
<section class="carousel-wrapper">
<div class="js-carousel carousel">
${mix.map((video) => CarouselSlide({ ...CarouselSlide.args, video: video })).join("\n")}
${slides}
</div>
</section>`;
};
Expand Down

0 comments on commit 1c94352

Please sign in to comment.