Skip to content

Commit 73990c5

Browse files
author
Christian Mayr
committed
add configurable parameters for done, cancel and albums text
1 parent 142d844 commit 73990c5

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

nativescript-imagepicker/index.d.ts

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

83+
/**
84+
* Set the text for the done button in iOS
85+
*/
8386
doneText?: string;
8487

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+
8598
android?: {
8699
/**
87100
* Provide a reason for permission request to access external storage on api levels above 23.

nativescript-imagepicker/viewmodel.ios.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,11 @@ export class ImagePicker extends data_observable.Observable {
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)