-
Notifications
You must be signed in to change notification settings - Fork 44
Open
Description
getting typescript error on attempting to add non-explicitly defined props in to component despite docs indicating that it is possible
Any other props will be passed down to the
element. This way, you can e.g. add an alt attribute to the image.
Type '{ src: string; alt: string; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<Magnifier> & Pick<Readonly<Props> & Readonly<{ children?: ReactNode; }>, "children" | "src"> & Partial<...> & Partial<...>'.
Property 'alt' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<Magnifier> & Pick<Readonly<Props> & Readonly<{ children?: ReactNode; }>, "children" | "src"> & Partial<...> & Partial<...>'.
looking at interface Props defined in /src/Magnifier.tsx is it possible that adding a [key: string]?: HTMLAttributes<T> would address the issue?
arielger
Metadata
Metadata
Assignees
Labels
No labels