Skip to content

ThemeProvider children type error #56

@Tobertet

Description

@Tobertet

Whenever you wrap something with the ThemeProvider in order to customize the theme, Typescript complains about this:

Property 'children' does not exist on type 'IntrinsicAttributes & ThemeProviderProps'

In order to solve it I had to go to ThemeProvider.d.ts and change line 34 from
export declare const ThemeProvider: React.FC<ThemeProviderProps>;
to
export declare const ThemeProvider: React.FC<PropsWithChildren<ThemeProviderProps>>;

It looks like this is simply a TS typing issue. I would open a PR myself but unfortunately I don't have much time lately.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions