import Image from 'next/image' - how to tsc its tailwind css?
Mic1 opened this issue · 3 comments
import Image from 'next/image'
<Image className="absolute inset-0 h-full w-full rounded-lg bg-gray-400 object-cover shadow-md" etc />
How do I tsc this> Thanks.
Tried moving into the enclosing div but not at all the same thing . am reading that Next changed the way Image behaves in the latest version that has broken a lot of people's code. One suggestion is to move the css into the enclosing div but has to be "relative". Tried this but image looks distorted.
Try the layout
prop on the Image
tag. The way you work with the next/image
is the same as you would normally.
I don't see how this is related to Tailwind Styled Components, closing for now, please add a way to reproduce if you think this is something that this library should solve.