I recently incorporated React Awesomeslider into my project, which is developed using Gatsby.js and Next.js, with Sanity.io as the CMS. The css styling is currently set up through post css.
https://github.com/rcaferati/react-awesome-slider
Following the documentation's recommendation, I included the plain css since I am not utilizing scss for this particular project.
Below is a snippet of my component:
import PropTypes from "prop-types";
import styles from "./Hero.module.css";
import client from "../../client";
import SimpleBlockContent from "../SimpleBlockContent";
import Cta from "../Cta";
import imageUrlBuilder from "@sanity/image-url";
import AutoplaySlider from "react-awesome-slider";
import AwesomeSliderStyles from "react-awesome-slider/dist/styles.css";
const builder = imageUrlBuilder(client);
function Hero(props) {
const { heading, image, tagline, ctas } = props;
const images = props.image;
return (
<div className={styles.root}>
<div className={styles.content}>
<h1 className={styles.title}>{heading}</h1>
<div className={styles.tagline}>{tagline && <SimpleBlockContent blocks={tagline} />}</div>
<AutoplaySlider
play={true}
cancelOnInteraction={false}
interval={6000}
style={AwesomeSliderStyles}
>
<div>
{images.map((image) => (
<img
className={styles.image}
src={builder.image(image).url()}
className={styles.image}
alt={heading}
/>
))}
</div>
</AutoplaySlider>
</div>
</div>
);
}
Hero.propTypes = {
heading: PropTypes.string,
backgroundImage: PropTypes.object,
tagline: PropTypes.array,
ctas: PropTypes.arrayOf(PropTypes.object),
};
export default Hero;
Although all imports are successful and the slider shows up on the page, I encountered the following error in the console...
Warning: Unsupported style property awssld__timer--hidden. Did you mean awssld__timer-hidden?
In addition, none of the other css styles seem to be loading correctly. Has anyone faced this issue before?
Your assistance would be greatly appreciated.
Thank you