Open ospfranco opened 3 weeks ago
I managed to get this working, seems the cssInterop
call is passing an array of props and not and object, therefore the destructuring is actually not working:
import {requireNativeComponent, ViewStyle} from 'react-native'
import {cssInterop} from 'nativewind'
export const BlurViewNative = requireNativeComponent<{
children?: any
onLayout?: (e: any) => void
startColor?: string
endColor?: string
style?: ViewStyle
cornerRadius?: number
disabled?: boolean
className?: string
}>('BlurView')
export const BlurView = (props: any) => {
return <BlurViewNative {...props} />
}
cssInterop(BlurView, {
className: 'style',
})
Is this a bug? I'm not sure, maybe at least it needs to be documented properly
Describe the bug I'm trying to apply native wind styles to a native component, the component is very bare-bones:
When I try to import it and apply
cssInterop
to it:However on runtime I get the following error: