Skip to content

Commit 04d47b8

Browse files
chrisbobbegnprice
authored andcommitted
action-sheets types: Make Button's title/errorMessage LocalizableText
We already have comments saying the strings are UI strings that should be represented in messages_en.json. But this reinforces the point, and also lets you pass the kind of LocalizableText that is an object with `.text` and `.values`.
1 parent 93d904f commit 04d47b8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/action-sheets/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import type {
1818
UserOrBot,
1919
EditMessage,
2020
Stream,
21+
LocalizableText,
2122
} from '../types';
2223
import type { UnreadState } from '../unread/unreadModelTypes';
2324
import {
@@ -102,7 +103,7 @@ type Button<-Args: { ... }> = {|
102103

103104
/** The label for the button. */
104105
// This UI string should be represented in messages_en.json.
105-
+title: string,
106+
+title: LocalizableText,
106107

107108
/** The title of the alert-box that will be displayed if the
108109
* callback throws. */
@@ -111,7 +112,7 @@ type Button<-Args: { ... }> = {|
111112
// has one.
112113
//
113114
// This UI string should be represented in messages_en.json.
114-
+errorMessage: string,
115+
+errorMessage: LocalizableText,
115116
|};
116117

117118
//

0 commit comments

Comments
 (0)