The css
prop is not recognized at build time. I'm unsure if this is due to misconfiguration of the project, or if this represents a known bug.
Type '{ children: (string | number | boolean | {} | ReactElement<any, string | ((props: any) => ReactElement<any, string | ... | (new (props: any) => Component<any, any, any>)>) | (new (props: any) => Component<...>)> | ReactNodeArray | ReactPortal | Element)[]; className: string; css: SerializedStyles; }' is not assignable to type 'IntrinsicAttributes & { theme?: Theme; as?: ElementType; } & ClassAttributes & HTMLAttributes<...> & { ...; }'. Property 'css' does not exist on type 'IntrinsicAttributes & { theme?: Theme; as?: ElementType; } & ClassAttributes & HTMLAttributes<...> & { ...; }'
To reproduce:
https://github.com/jbcurrie/jbcurrie.github.io/tree/next
- npm install
- open
NavMenu.tsx
- Inspect Line 18
Expected behavior:
The css
prop should be recognized at build time.
Environment information:
- react version: 17.0.1
- next version: 10.0.5
- @emotion/react version: 11.1.5