breautek commented on PR #157: URL: https://github.com/apache/cordova-plugin-dialogs/pull/157#issuecomment-1094370427
> One would expect red is generally the negative action but it is also the users decision to fit their color format.. Agreed. [Apple Docs](https://developer.apple.com/documentation/uikit/uialertactionstyle/uialertactionstyledestructive) states that the `UIAlertActionStyleDestructive` style is for: > a style that indicates the action might change or delete data. In otherwords, you would generally use this style when you have perhaps a delete confirmation prompt, where the OK button is the red / dangerous style. ``` if([btnLabel isEqualToString:@"Cancel"] || [btnLabel isEqualToString:@"No"]){ btnStyle=UIAlertActionStyleDestructive; } ``` But this PR appears to apply this style to the "cancel" button or a "no" button. With all respect, I think this change is too opinionated and not fit to be in the library. It would be better if we can provide style options so that the developer can opt to choose a style themselves rather than trying to select a style based on the button text. I understand this might be difficult to accomplish, given that the existing API isn't very extensible. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
