react-native-chooser icon indicating copy to clipboard operation
react-native-chooser copied to clipboard

Cancel button

Open enguerranws opened this issue 7 years ago • 8 comments

Hi,

I'm just wondering how to make a cancel button (or cancel on a tap on the backdrop) using this component. Any ideas?

enguerranws avatar Oct 19 '17 09:10 enguerranws

Hi, Tap on background should close the dropdown.

gs-akhan avatar Oct 19 '17 10:10 gs-akhan

Hi @gs-akhan,

sure it does, but adding a close button (a simple cross in the corner) should make this less implicit? That being said, I guess I can do it by simply adding some styles.

enguerranws avatar Oct 20 '17 12:10 enguerranws

That being said, I guess I can do it by simply adding some styles.

Well, no. I would simply add an <Image/> component on the backdrop, but it can't be done right now. Another option would be to have a onOpen onClose property so I could display / hide an external component based on a state property.

enguerranws avatar Oct 20 '17 12:10 enguerranws

The close button makes sense. You can add it.

Btw how do you plan to add that cross, as an image ? SVG ?

Thanks

gs-akhan avatar Oct 20 '17 12:10 gs-akhan

Btw how do you plan to add that cross, as an image ? SVG ?

Right now, I think of a RN Image component (as SVG support means some react-native svg module dependency). I actually don't know how to achieve that right now using your plugin: is it possible?

enguerranws avatar Oct 20 '17 12:10 enguerranws

There is an indicator component that is used to render a drop icon . You can check it .. in this very library

On Fri, 20 Oct 2017 at 6:12 PM, Enguerran Weiss [email protected] wrote:

Btw how do you plan to add that cross, as an image ? SVG ?

Right now, I think of a RN Image component (as SVG support means some react-native svg module dependency). I actually don't know how to achieve that right now using your plugin: is it possible?

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/gs-akhan/react-native-chooser/issues/40#issuecomment-338195579, or mute the thread https://github.com/notifications/unsubscribe-auth/AFYnVro3D64yE3OSKtQgAjluqbeIqEFxks5suJUkgaJpZM4P-6tb .

gs-akhan avatar Oct 20 '17 12:10 gs-akhan

There is an indicator component that is used to render a drop icon

The indicator property shows an indicator on the select item itself, not in the modal. I would like to find something to add a close / cancel button inside the modal backdrop.

enguerranws avatar Oct 20 '17 13:10 enguerranws

Yes, I was suggesting you can checkout how that drop icon was built. Or you can use ImageComponent too. I am fine.

gs-akhan avatar Oct 20 '17 13:10 gs-akhan