mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Re-land "[RN] TM: attempt to integrate with internal codegen infra""
Summary: This is a re-land of https://github.com/facebook/react-native/commit/66e02588850ee81aa8574edc46c954e7bccf42e7 after fixing internal build failures. Reviewed By: mdvacca Differential Revision: D15764832 fbshipit-source-id: f4fb347a9c6c02fb146b24ba395436bd31a37deb
This commit is contained in:
committed by
Facebook Github Bot
parent
dec9698d1c
commit
0a66ded7d0
@@ -15,7 +15,23 @@ import NativeDialogManagerAndroid, {
|
||||
type DialogOptions,
|
||||
} from '../NativeModules/specs/NativeDialogManagerAndroid';
|
||||
import RCTAlertManager from './RCTAlertManager';
|
||||
import {type Buttons, type Options, type AlertType} from './NativeAlertManager';
|
||||
|
||||
export type AlertType =
|
||||
| 'default'
|
||||
| 'plain-text'
|
||||
| 'secure-text'
|
||||
| 'login-password';
|
||||
export type AlertButtonStyle = 'default' | 'cancel' | 'destructive';
|
||||
export type Buttons = Array<{
|
||||
text?: string,
|
||||
onPress?: ?Function,
|
||||
style?: AlertButtonStyle,
|
||||
}>;
|
||||
|
||||
type Options = {
|
||||
cancelable?: ?boolean,
|
||||
onDismiss?: ?() => void,
|
||||
};
|
||||
|
||||
/**
|
||||
* Launches an alert dialog with the specified title and message.
|
||||
|
||||
@@ -13,27 +13,10 @@
|
||||
import type {TurboModule} from '../TurboModule/RCTExport';
|
||||
import * as TurboModuleRegistry from '../TurboModule/TurboModuleRegistry';
|
||||
|
||||
export type Buttons = Array<{
|
||||
text?: string,
|
||||
onPress?: ?Function,
|
||||
style?: AlertButtonStyle,
|
||||
}>;
|
||||
|
||||
export type Options = {
|
||||
cancelable?: ?boolean,
|
||||
onDismiss?: ?() => void,
|
||||
};
|
||||
|
||||
/* 'default' | plain-text' | 'secure-text' | 'login-password' */
|
||||
export type AlertType = string;
|
||||
|
||||
/* 'default' | 'cancel' | 'destructive' */
|
||||
export type AlertButtonStyle = string;
|
||||
|
||||
export type Args = {|
|
||||
title?: string,
|
||||
message?: string,
|
||||
buttons?: Buttons,
|
||||
buttons?: Object, // TODO: have a better type
|
||||
type?: string,
|
||||
defaultValue?: string,
|
||||
cancelButtonKey?: string,
|
||||
|
||||
@@ -30,7 +30,7 @@ export interface Spec extends TurboModule {
|
||||
+blur: (reactTag: ?number) => void;
|
||||
+findSubviewIn: (
|
||||
reactTag: ?number,
|
||||
point: [number, number],
|
||||
point: Array<number>,
|
||||
callback: (
|
||||
nativeViewTag: number,
|
||||
left: number,
|
||||
|
||||
Reference in New Issue
Block a user