testshallpass / react-native-dropdownalert

An alert to notify users about an error or something else
MIT License
1.86k stars 253 forks source link

Add support for iOS and Android like notifications #23

Closed testshallpass closed 1 year ago

testshallpass commented 8 years ago

Thinking about adding alert types that are styled similar to the built in ones provided by Android and iOS. (👍 if you agree) Here are some screenshots of them:

iOS iosnotification

android androidnotification

testshallpass commented 7 years ago

I have been experimenting and prototyping and have reached an ideal solution to add this feature in. I will be adding a branch and I will continue to finalize it. It is a major change so will be for 3.0.0.

testshallpass commented 7 years ago

A change in implementation would be needed :

    const values = {
      bigImage: 'https://facebook.github.io/react/img/logo_og.png',
      smallImage: 'https://facebook.github.io/react/img/logo_og.png',
      cancelImage: 'https://facebook.github.io/react/img/logo_og.png',
      image: 'https://facebook.github.io/react/img/logo_og.png',
      header: 'Messenger',
      timestamp: '59m ago',
      title: 'Capitalize on low hanging fruit',
      username: 'username@company.com',
      message: 'Podcasting operational change management inside of workflows to establish a framework.',
      actions: [{text: 'Reply', callback: this.onAction}, {text: 'Archive', callback: this.onAction}]
    }
    this.dropdown.alertWithData(values, (alertData) =>{
      console.log(alertData);
    })
ma-pe commented 6 years ago

any news on this? i am exited about this feature.

testshallpass commented 6 years ago

I am going to revisit this. Which notification would be priority for you? iOS or Android @ma-pe

ma-pe commented 6 years ago

I have no priority since I am interested in both :)

tandat2209 commented 5 years ago

Any updates? I simply need a callback when calling alertWithType

testshallpass commented 5 years ago

@tandat2209 Checkout the open PR #150 this is attempt at it and I have some feedback I am waiting on.

testshallpass commented 5 years ago

Also, as far as this feature, it's next in line after 3 other features + 1 enhancement are complete.

tandat2209 commented 5 years ago

@testshallpass Thanks, I will check it out 👍

saadmutahar commented 5 years ago

@testshallpass Is this feature added?

azhararmar commented 4 years ago

It would also be great to have renderContainer() where it allows us to design our own custom alert type.

testshallpass commented 1 year ago

Closing as will not support this internally as the notification UI/UX can update from time to time hence is too much to manage in this library. However, can take advantage of new children prop in latest release (v5.0.0) to build your own alert (BYOA). I have done this myself in the example project to recreate these notifications. Check out: NotificationAndroid and NotificationIOS