mirror of
https://github.com/status-im/react-native.git
synced 2025-02-05 14:13:26 +00:00
Add ?Fbt to flow type for the title & message props
Differential Revision: D6253195 fbshipit-source-id: eadb185eacdf341393d73357beab22bed1d0169e
This commit is contained in:
parent
515eb0e801
commit
2be3ae1ff2
@ -16,6 +16,7 @@ const NativeModules = require('NativeModules');
|
|||||||
const Platform = require('Platform');
|
const Platform = require('Platform');
|
||||||
|
|
||||||
import type { AlertType, AlertButtonStyle } from 'AlertIOS';
|
import type { AlertType, AlertButtonStyle } from 'AlertIOS';
|
||||||
|
import type { Fbt } from 'fbt';
|
||||||
|
|
||||||
export type Buttons = Array<{
|
export type Buttons = Array<{
|
||||||
text?: string,
|
text?: string,
|
||||||
@ -79,8 +80,8 @@ type Options = {
|
|||||||
class Alert {
|
class Alert {
|
||||||
|
|
||||||
static alert(
|
static alert(
|
||||||
title: ?string,
|
title: ?string | ?Fbt,
|
||||||
message?: ?string,
|
message?: ?string | ?Fbt,
|
||||||
buttons?: Buttons,
|
buttons?: Buttons,
|
||||||
options?: Options,
|
options?: Options,
|
||||||
type?: AlertType,
|
type?: AlertType,
|
||||||
@ -104,8 +105,8 @@ class Alert {
|
|||||||
class AlertAndroid {
|
class AlertAndroid {
|
||||||
|
|
||||||
static alert(
|
static alert(
|
||||||
title: ?string,
|
title: ?string | ?Fbt,
|
||||||
message?: ?string,
|
message?: ?string | ?Fbt,
|
||||||
buttons?: Buttons,
|
buttons?: Buttons,
|
||||||
options?: Options,
|
options?: Options,
|
||||||
): void {
|
): void {
|
||||||
|
@ -12,7 +12,9 @@
|
|||||||
*/
|
*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var RCTAlertManager = require('NativeModules').AlertManager;
|
const RCTAlertManager = require('NativeModules').AlertManager;
|
||||||
|
|
||||||
|
import type { Fbt } from 'fbt';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An Alert button type
|
* An Alert button type
|
||||||
@ -133,8 +135,8 @@ class AlertIOS {
|
|||||||
* );
|
* );
|
||||||
*/
|
*/
|
||||||
static alert(
|
static alert(
|
||||||
title: ?string,
|
title: ?string | ?Fbt,
|
||||||
message?: ?string,
|
message?: ?string | ?Fbt,
|
||||||
callbackOrButtons?: ?(() => void) | ButtonsArray,
|
callbackOrButtons?: ?(() => void) | ButtonsArray,
|
||||||
type?: AlertType,
|
type?: AlertType,
|
||||||
): void {
|
): void {
|
||||||
@ -192,8 +194,8 @@ class AlertIOS {
|
|||||||
* );
|
* );
|
||||||
*/
|
*/
|
||||||
static prompt(
|
static prompt(
|
||||||
title: ?string,
|
title: ?string | ?Fbt,
|
||||||
message?: ?string,
|
message?: ?string | ?Fbt,
|
||||||
callbackOrButtons?: ?((text: string) => void) | ButtonsArray,
|
callbackOrButtons?: ?((text: string) => void) | ButtonsArray,
|
||||||
type?: ?AlertType = 'plain-text',
|
type?: ?AlertType = 'plain-text',
|
||||||
defaultValue?: string,
|
defaultValue?: string,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user