Backed out changeset eadb184eacdf
Reviewed By: fkgozali, hramos Differential Revision: D6287083 fbshipit-source-id: 43c6e43a9d5411e71f51824f9443559b4e0a47e2
This commit is contained in:
parent
a47431ed74
commit
780938170b
|
@ -16,7 +16,6 @@ const NativeModules = require('NativeModules');
|
|||
const Platform = require('Platform');
|
||||
|
||||
import type { AlertType, AlertButtonStyle } from 'AlertIOS';
|
||||
import type { Fbt } from 'fbt';
|
||||
|
||||
export type Buttons = Array<{
|
||||
text?: string,
|
||||
|
@ -80,8 +79,8 @@ type Options = {
|
|||
class Alert {
|
||||
|
||||
static alert(
|
||||
title: ?string | ?Fbt,
|
||||
message?: ?string | ?Fbt,
|
||||
title: ?string,
|
||||
message?: ?string,
|
||||
buttons?: Buttons,
|
||||
options?: Options,
|
||||
type?: AlertType,
|
||||
|
@ -105,8 +104,8 @@ class Alert {
|
|||
class AlertAndroid {
|
||||
|
||||
static alert(
|
||||
title: ?string | ?Fbt,
|
||||
message?: ?string | ?Fbt,
|
||||
title: ?string,
|
||||
message?: ?string,
|
||||
buttons?: Buttons,
|
||||
options?: Options,
|
||||
): void {
|
||||
|
|
|
@ -12,9 +12,7 @@
|
|||
*/
|
||||
'use strict';
|
||||
|
||||
const RCTAlertManager = require('NativeModules').AlertManager;
|
||||
|
||||
import type { Fbt } from 'fbt';
|
||||
var RCTAlertManager = require('NativeModules').AlertManager;
|
||||
|
||||
/**
|
||||
* An Alert button type
|
||||
|
@ -135,8 +133,8 @@ class AlertIOS {
|
|||
* );
|
||||
*/
|
||||
static alert(
|
||||
title: ?string | ?Fbt,
|
||||
message?: ?string | ?Fbt,
|
||||
title: ?string,
|
||||
message?: ?string,
|
||||
callbackOrButtons?: ?(() => void) | ButtonsArray,
|
||||
type?: AlertType,
|
||||
): void {
|
||||
|
@ -194,8 +192,8 @@ class AlertIOS {
|
|||
* );
|
||||
*/
|
||||
static prompt(
|
||||
title: ?string | ?Fbt,
|
||||
message?: ?string | ?Fbt,
|
||||
title: ?string,
|
||||
message?: ?string,
|
||||
callbackOrButtons?: ?((text: string) => void) | ButtonsArray,
|
||||
type?: ?AlertType = 'plain-text',
|
||||
defaultValue?: string,
|
||||
|
|
Loading…
Reference in New Issue