Qeepsake / react-native-images-collage

Robust interactive image collage component for React Native
MIT License
116 stars 30 forks source link

Adding image onFocus and allowing image container style props for DynamicCollage #21

Closed harbolaez closed 3 years ago

harbolaez commented 3 years ago

Adding onImageFocus and imageFocussedStyle prop to DynamicCollage. When a user pressed on a image it will trigger the onImafeFocus property exposing two parameters metrixId(m), imageIndex(i) and the event(e) of the TouchableWithoutFeedback. You can add custom style to the focussed image with the prop imageFocussedStyle

API

<DynamicCollage
  images={[]}
  onImageFocus={({ e, m, i }) => {
    console.log(m,i)
  }}
  imageFocussedStyle={{ borderColor: "red" }}
  ...
/>
lukebrandonfarrell commented 3 years ago

Thanks for the PR @harbolaez ! Will test these changes this evening, then will merge and push if I discover no issues :)

lukebrandonfarrell commented 3 years ago

@harbolaez Will review this today :)

lukebrandonfarrell commented 3 years ago

@harbolaez if you could also resolve the conflicts, that would be great! Then I'll create a new version on NPM for all three of these features #21 #22 and #20

lukebrandonfarrell commented 3 years ago

@all-contributors please add @harbolaez for code and documentation

allcontributors[bot] commented 3 years ago

@lukebrandonfarrell

I've put up a pull request to add @harbolaez! :tada: