I have this code in Next.js:
<div
className={"bg-white origin-top transition-all duration-300 absolute z-50 w-full"}
style={isOpen ? {} : { transform: 'rotateX(90deg)' }}
>
As you can see, I'm using style
attribute to conditionally apply some CSS on an element. The isOpen
is a state here.
How can I write it for Qwik. I tried the following and it did not work:
<div
class={"bg-white origin-top transition-all duration-300 absolute z-50 w-full"}
style={isOpen ? {} : { transform: 'rotateX(90deg)' }}
>