schiehll / react-alert

alerts for React
MIT License
607 stars 99 forks source link

Using this like Alert in React Native? #159

Closed yesIamFaded closed 4 years ago

yesIamFaded commented 4 years ago

Hey there, I just came across this Module and I have some questions.

I am building a RN App and I want to use Expo Web. Expo Web currently does not support the Alert Module from React Native thats why I want to code a workaround.

I was hoping I can use this to achieve this. I tried the SandBox and noticed that the "alert" here is just a little hint popping at the bottom of the screen. Is it possible to make it pop in the middle of the screen and only disappear if the user clicks 1 of 2 buttons build in the alert?

Like a Close button to dismiss the alert and a Edit button to for example Navigate to another page. Or should I just use a Modal for this ? like react-modal which I am about to use to replace ReactNatives Modal component.

Thanks ~Faded.

yesIamFaded commented 4 years ago

Any guidance or tips on this?

besLisbeth commented 4 years ago

Hi @yesIamFaded

  1. Is it possible to make it pop in the middle of the screen - yes, it's positions.MIDDLE
  2. You should try to write your own AlertTemplate with custom onClick events on the buttons I hope, that it would work for you
yesIamFaded commented 4 years ago

Alright thanks @besLisbeth :)