Skip to content

Commit 5b1a8a3

Browse files
author
radeva
authored
Merge pull request #93 from RyamBaCo/master
iOS: Parameters for button texts
2 parents 1576bb3 + 73990c5 commit 5b1a8a3

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

nativescript-imagepicker/index.d.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,21 @@ interface Options {
8080
*/
8181
mode?: string;
8282

83+
/**
84+
* Set the text for the done button in iOS
85+
*/
86+
doneText?: string;
87+
88+
/**
89+
* Set the text for the cancel button in iOS
90+
*/
91+
cancelText?: string;
92+
93+
/**
94+
* Set the text for the albums button in iOS
95+
*/
96+
albumsText?: string;
97+
8398
android?: {
8499
/**
85100
* Provide a reason for permission request to access external storage on api levels above 23.

nativescript-imagepicker/viewmodel.ios.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,15 @@ export class ImagePicker extends data_observable.Observable {
7070
}
7171

7272
get doneText(): string {
73-
return "Done";
73+
return this._options && this._options.doneText ? this._options.doneText : "Done";
7474
}
7575

7676
get cancelText(): string {
77-
return "Cancel";
77+
return this._options && this._options.cancelText ? this._options.cancelText : "Cancel";
7878
}
7979

8080
get albumsText(): string {
81-
return "Albums";
81+
return this._options && this._options.albumsText ? this._options.albumsText : "Albums";
8282
}
8383

8484
get mode(): string {

0 commit comments

Comments
 (0)