I am attempting to import a css data in my respond jsx element as well as it functions great with regular HTML aspects however as quickly as I transform the aspect to a movement aspect for eg: a div to motion.div the css quits working.
below’s some instance code
import React from "respond";.
import "./ LandingPageBody.scoped.css";.
import {activity, useAnimation} from "framer-motion";.
import {useInView} from "react-intersection-observer";.
import {useEffect} from "respond";.
const topCardVariants = {
noticeable: {
opacity: 1,.
x: 0,.
shift: {
period: 0.5,.
},.
},.
concealed: {
opacity: 0,.
x: "-3 rapid eye movement",.
},.
};.
export const LandingPageBody = () => > {
const control = useAnimation();.
const [ref, inView] = useInView();.
useEffect(() => > {
if (inView) {
control.start(" noticeable");.
} else {
control.start(" concealed");.
}
}, [control, inView]);.
return (.
<< div className=" body">
<> < div className=" top-cards-heading">
<> < h3>> Remaining healthy and balanced, facilitated with modern technology<.
<.
<< motion.div.
className=" top-cards-container"
ref= {ref}
variations= {topCardVariants}
first=" concealed"
stimulate= {control}
>>.
<< div className=" top-card" id=" top-card1">
> as.
<.
<< div className=" top-card" id=" top-card2">
> a.
<.
<< div className=" top-card" id=" top-card3">
> a.
<.
<.
<.
);.
};.
And also the css from the css data is not functioning with.top-cards-container
The CSS data consists of:
top-cards-container {
elevation: minutes( 25vw);.
screen: flex;.
flex-direction: row;.
justify-content: space-evenly;.
margin-top: 4vh;.
}
once more, this functions as quickly as I eliminate the activity.