OriAmir / React-Responsive-Gallery

Simple and responsive gallery for react
45 stars 5 forks source link

Types for lightBoxAdditionalProps too implicit #25

Closed choozn closed 2 years ago

choozn commented 2 years ago

Type is missing the following properties from type 'ILightBoxProps': mainSrc, onCloseRequestts(2739)

Both mainSrc and onCloseRequestts should be optional in the interface so you are able to provide additional lightbox props. The type interface should be

interface AdditionalILightBoxProps extends Omit<ILightBoxProps, "mainSrc" | "onCloseRequest"> { 
    mainSrc?: string;
    onCloseRequest?(): void;
}
OriAmir commented 2 years ago

Hi @choozn thanks for let me know about that. I will take a look on that asap and update.

OriAmir commented 2 years ago

thanks @choozn , I added some other properties that were not relevant to this library and publish a release: https://github.com/OriAmir/React-Responsive-Gallery/releases/tag/2.1.3