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 image source to alert with type function #175

Closed lk321 closed 5 years ago

lk321 commented 5 years ago

It's a simple change 👷

This change is to put a custom image source in the DropDownAlert menu.

Example:

myDropDown.alertWithType('info','Test title', 'message', null, require('assets/images/simple-logo.png'));

Result: image

codecov-io commented 5 years ago

Codecov Report

Merging #175 into master will not change coverage. The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #175   +/-   ##
=======================================
  Coverage   71.12%   71.12%           
=======================================
  Files          11       11           
  Lines         187      187           
=======================================
  Hits          133      133           
  Misses         54       54
Impacted Files Coverage Δ
DropdownAlert.js 64.47% <100%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 06082c6...477a090. Read the comment docs.

testshallpass commented 5 years ago

@lk321 Please describe more on the use case. Thanks.

lk321 commented 5 years ago

@testshallpass done ;)

testshallpass commented 5 years ago

@lk321 Technically, you could use prop infoImageSrc to acheive this.

booboothefool commented 5 years ago

@testshallpass I believe I could use this feature. I have one <DropdownAlert /> at the root of my app, however I would like to be able to pass dynamic images into it e.g. avatars of different users who messaged you.

testshallpass commented 5 years ago

@lk321 Closing, I reworked it in PR #200