Closed sgrund14 closed 1 year ago
This is likely a bug with the nativewind
types. I recommend opening an issue there.
got it, although noticed that it wasn't happening on Solito V2 🤔
oh, I see. now nativewind
wants me to be explicit about the props I pass in for some reason
import { styled } from 'nativewind';
import { SolitoImageProps } from 'solito/build/image/image.types';
import { SolitoImage } from 'solito/image';
export const StyledImage = styled<SolitoImageProps>(SolitoImage);
is required to satisfy typescript in V3. seems like a workaround...
fwiw, the props of the SolitoImage
did change from V2 -> V3
V2
function SolitoImage(props: Omit<SolitoImageProps, 'resizeMode' | 'style'> & Pick<ComponentProps<typeof FastImage>, 'style' | 'resizeMode'>): JSX.Element
V3
const SolitoImage: ForwardRefExoticComponent<SolitoImageProps & RefAttributes<Image>>
hello,
noticed that the new V3 of SolitoImage is throwing a typescript error when wrapped with
styled
from NativewindSeems to still be working otherwise...