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

<Divider /> overload error #18

Closed
mattcopas opened this issue Oct 4, 2019 · 1 comment
Closed

<Divider /> overload error #18

mattcopas opened this issue Oct 4, 2019 · 1 comment

Comments

@mattcopas
Copy link

When using <Divider /> I get the error:

No overload matches this call.
  Overload 1 of 2, '(props: (Pick<DividerProps, "ref" | "style" | "title" | "children" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | ... 249 more ... | "light"> & StyledComponentProps<...> & { ...; } & Pick<...> & { ...; }) | (Pick<...> & ... 3 more ... & { ...; }), context?: any): ReactElement<...> | ... 1 more ... | null', gave the following error.
    Type '{}' is not assignable to type '(IntrinsicAttributes & Pick<DividerProps, "ref" | "style" | "title" | "children" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | ... 250 more ... | "light"> & StyledComponentProps<...> & { ...; } & Pick<...> & { ...; }) | (IntrinsicAttributes & ... 4 more ... & {...'.
      Property 'color' is missing in type '{}' but required in type 'Pick<PropsWithChildren<DividerProps>, "ref" | "style" | "title" | "children" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | ... 250 more ... | "light">'.
  Overload 2 of 2, '(props: PropsWithChildren<(Pick<DividerProps, "ref" | "style" | "title" | "children" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | ... 249 more ... | "light"> & StyledComponentProps<...> & { ...; } & Pick<...> & { ...; }) | (Pick<...> & ... 3 more ... & { ...; })>, context?: any): ReactElement<...> | ... 1 more ... | null', gave the following error.
    Type '{}' is not assignable to type '(IntrinsicAttributes & Pick<DividerProps, "ref" | "style" | "title" | "children" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | ... 250 more ... | "light"> & ... 4 more ... & { ...; }) | (IntrinsicAttributes & ... 5 more ... & { ...; })'.
      Property 'color' is missing in type '{}' but required in type 'Pick<PropsWithChildren<DividerProps>, "ref" | "style" | "title" | "children" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | ... 250 more ... | "light">'.ts(2769)

May be similar to #17

@jonnyelliot
Copy link
Contributor

color prop needs to be optional

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