Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Icon doesn't compile #6144

Closed
marc-schwering opened this issue May 21, 2022 · 1 comment
Closed

Icon doesn't compile #6144

marc-schwering opened this issue May 21, 2022 · 1 comment

Comments

@marc-schwering
Copy link

marc-schwering commented May 21, 2022

Using an Icon raises type errors

Expected Behavior

<Add />

doesn't fail.

Actual Behavior

Fails with:

'Add' cannot be used as a JSX component.
  Its element type 'ReactElement<any, any> | Component<IconProps & SVGProps<SVGSVGElement>, any, any> | null' is not a valid JSX element.
    Type 'Component<IconProps & SVGProps<SVGSVGElement>, any, any>' is not assignable to type 'Element | ElementClass | null'.
      Type 'Component<IconProps & SVGProps<SVGSVGElement>, any, any>' is not assignable to type 'ElementClass'.
        The types returned by 'render()' are incompatible between these types.
          Type 'React.ReactNode' is not assignable to type 'import("/home/marc/prevailing-winds/frontend/node_modules/@types/react-router/node_modules/@types/react/index").ReactNode'.
            Type '{}' is not assignable to type 'ReactNode'.

Your Environment

  • Grommet version: 2.23.0
  • Grommet icons: 4.7.0
  • Node: 16.15.0
@marc-schwering marc-schwering changed the title Button icon argument type does not match Button with icon doesn't compile May 21, 2022
@marc-schwering marc-schwering changed the title Button with icon doesn't compile Icon doesn't compile May 21, 2022
@mRcSchwering
Copy link

This was related to this issue: software-mansion/react-native-svg#1741

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants