styled-react-modal icon indicating copy to clipboard operation
styled-react-modal copied to clipboard

Property 'opacity' does not exist on 'IntrinsicAttributes'

Open AliYar-Khan opened this issue 1 year ago • 1 comments

I am trying to run the example listed here but in typescript project. Added the types from here as well. But is giving me this error

Property 'opacity' does not exist on type 'IntrinsicAttributes & { ref?: Ref<Component<ModalProps, any, any>> | undefined; key?: Key | null | undefined; children?: ReactNode; ... 8 more ...; onBackgroundClick?: ((event: MouseEvent<...>) => void) | undefined; } & { ...; } & { ...; }'.ts(2769)

AliYar-Khan avatar Feb 01 '24 18:02 AliYar-Khan

It looks like you need to add the type for the styled component whose opacity prop you're trying to change.

AlexanderRichey avatar Feb 17 '24 16:02 AlexanderRichey