Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Got an error when using with Astrojs in .astro file #759

Open
Sercurio opened this issue Apr 26, 2024 · 0 comments
Open

Got an error when using with Astrojs in .astro file #759

Sercurio opened this issue Apr 26, 2024 · 0 comments

Comments

@Sercurio
Copy link

I'm trying to use it in a Astro project in .astro file, but get Type '{ children: any[]; "client:load": true; }' is not assignable to type 'IntrinsicAttributes & CarouselProps'. Type '{ children: any[]; "client:load": true; }' is missing the following properties from type 'CarouselProps': axis, centerSlidePercentage, interval, labels, and 27 more. error.

Gallery.astro

---
import "react-responsive-carousel/lib/styles/carousel.min.css"; // requires a loader
import { Carousel } from "react-responsive-carousel";

const photos = await Astro.glob("../images/photos/*.jpg");
---

<div class="w-1/3">
<Carousel client:load>
  {
    photos.map((photo) => (
      <div>
        <img src={photo.default.src} alt="" />
        <p class="legend">Legend 1</p>
      </div>
    ))
  }
</Carousel>
</div>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant