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 · 1 comment
Open

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

Sercurio opened this issue Apr 26, 2024 · 1 comment
Labels

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>

Copy link

stale bot commented Nov 4, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant