natysoz / expo-images-picker

Multiple Asset Photos Videos selecting package for Expo SDK
MIT License
95 stars 36 forks source link

Custom TopNavigator Selected Items Length #2

Closed ArcRanges closed 3 years ago

ArcRanges commented 3 years ago

Hi,

I would like to understand where 'translator' function is imported from or how to implement this properly.

 <AssetsSelector
  options={{
      ...otherProps,
      CustomTopNavigator: {
          Component: CustomNavImageSelection,
          props: {
              backFunction: true,
     -->      text: translator(T.PICK_IMAGES), <----
              doneFunction: (data: Asset[]) => onDone(data),
          },
      }
  }}
/>

Thank you for your help.

natysoz commented 3 years ago

hi ArcRanges ,

This is just my implementation for i18 , you can use any string you want for this variable , or , any function that will return string in the end.

My CustomNavigator for the Image selection is expecting to get text prop,

You send with props:{}

the custom props u want to send to your CustomNavImageSelection or whatever dynamic component you have.

you can also not having custom top nav and not sending props at all :) ,

ArcRanges commented 3 years ago

I see,

How can I still show Selected n items on top bar?

I would like to edit the Default Top Bar itself but given the structure of the code, I think it would be a bit challenging.

Would you be able to add a style prop for the DefaultTopNavigator so I can override the styling of the:

If I have this, it would make everything easier.

Thank you so much.

natysoz commented 3 years ago

what style u are missing exactly ? you wanna change the size position and radius or the buttons ?

if you want i can upload a demo to show how to send custom nav that can also include the number of selected items

ArcRanges commented 3 years ago

Hi sorry for the late response,

I just need to manipulate the styling for the elements of the TopNavigator mentioned above.

Your demo would be helpful as well. Thank you.

natysoz commented 3 years ago

what exactly you want to edit can u send example of what you expect to have?

ArcRanges commented 3 years ago

Screen Shot 2020-11-25 at 5 58 44 PM

I just want to have the dynamic text that says 5 pictures selected.

natysoz commented 3 years ago

221 aaa

i can add a style prop where you can send any valid ViewStyle object and it will overwrite , is that what you need ? i can add it quickly :)

ArcRanges commented 3 years ago

Yes. I would like that please. Thank you.

On Dec 5, 2020, at 1:30 PM, Natysoz notifications@github.com wrote:



[221]https://user-images.githubusercontent.com/16538415/101265774-c4e2ab00-3751-11eb-9cad-d3404e1d930c.JPG [aaa]https://user-images.githubusercontent.com/16538415/101265775-c57b4180-3751-11eb-94a9-7e4f001754dd.JPG

i can add a style prop where you can send any valid ViewStyle object and it will overwrite , is that what you need ? i can add it quickly :)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/natysoz/expo-images-picker/issues/2#issuecomment-739418684, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADHH74ZYHPTLOH7RDLSAQNLSTKRANANCNFSM4TQBQ56Q.

natysoz commented 3 years ago

ok sorry for late response was too busy with my products , i will push new version tmr morning :)

ArcRanges commented 3 years ago

Thank you so much!

On Dec 5, 2020, at 1:46 PM, Natysoz notifications@github.com wrote:



ok sorry for late response was too busy with my products , i will push new version tmr morning :)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/natysoz/expo-images-picker/issues/2#issuecomment-739420240, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADHH746OVINK4Q4H56JEMDLSTKSZ3ANCNFSM4TQBQ56Q.

natysoz commented 3 years ago

I add a demo on expo snack so you can use this to understand the changes ,

at => https://snack.expo.io/@natysoz/expo-images-picker-example

few bugs was fixed , and you now can send style objects check Readme file 👍

ArcRanges commented 3 years ago

Thank you so much!

jensonjohn001 commented 3 years ago

How to get selected items length in custom TopNavigator?