I've added React Awesomeslider into my project, which is built with Gatsby.js, Next.js and using Sanity.io as a CMS. The css is currently configured by post css.
https://github.com/rcaferati/react-awesome-slider
I've linked the plain css as advised in the documentation (and as I'm not using scss for this project).
Here is 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;
Everything is showing as imported and the slider is appearing on the page however I'm having this show up in the console...
Warning: Unsupported style property awssld__timer--hidden. Did you mean awssld__timer-hidden?
And none of the other css seems to be pulling through either. Has anyone come across this before?
Any help would be appreciated.
Thanks