material-tailwind
material-tailwind copied to clipboard
All carousel images show up in first box.
Issue after reappearing in main project
Here is the whole component:
return (
<Carousel
className="rounded-none border border-black h-36 w-48"
navigation={({ setActiveIndex, activeIndex, length }) => (
<div className="absolute bottom-4 left-2/4 z-50 flex -translate-x-2/4 gap-2">
{new Array(length).fill("").map((_, i) => (
<span
key={i}
className={"border block h-1 cursor-pointer rounded-none transition-all content-[''] ${
activeIndex === i
? "w-8 bg-white border-black"
: "w-4 bg-white/50 border-black/50"
}"}
onClick={() => setActiveIndex(i)}
/>
))}
</div>
)}
prevArrow={({ handlePrev }) => <></>}
nextArrow={({ handleNext }) => <></>}
>
{src.split(";").map((s, index) => {
return <img src={s} key={index} className="object-scale-down" />;
})}
</Carousel>
);
};
No changes were made between the carousel working and breaking.
@adamllryan it seems like a styling issue could you please confirm that where you've used the Carousel is indexed on the tailwind config on the content part.
I was facing the same issue. I had to add "./**/@material-tailwind/**/*.{js,ts,jsx,tsx,mdx}"
in my tailwind config file so that the material-tailwind inside the node_modules get the access to the tailwind classes.
module.exports = {
content: [
"./src/**/*.{html,js,ts,jsx,tsx,mdx}",
"./**/@material-tailwind/**/*.{html,js,ts,jsx,tsx,mdx}"
],
theme: {},
plugins: [],
};
Not sure if this is the correct way to solve this. Has anyone else fixed this using any other workaround?
Same issue here. Anyone have a fix?