mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
Back out "Revert D52919566: [RN] Move codegen root directory from Libraries to src"
Summary: Changelog: [internal] bypass-github-export-checks Reviewed By: huntie Differential Revision: D52958335 fbshipit-source-id: 24403cdae650fdd4ec0c739b912f69bd6cd5aaad
This commit is contained in:
1 parent
123fd9a535
commit
26e33a5f17
149 files changed
+3600
-3832
No files matched your search
+3
-38
@@ -8,41 +8,6 @@
|
||||
* @format
|
||||
*/
|
||||
|
||||
import type {TurboModule} from '../../TurboModule/RCTExport';
|
||||
|
||||
import * as TurboModuleRegistry from '../../TurboModule/TurboModuleRegistry';
|
||||
|
||||
/* 'buttonClicked' | 'dismissed' */
|
||||
type DialogAction = string;
|
||||
/*
|
||||
buttonPositive = -1,
|
||||
buttonNegative = -2,
|
||||
buttonNeutral = -3
|
||||
*/
|
||||
type DialogButtonKey = number;
|
||||
export type DialogOptions = {|
|
||||
title?: string,
|
||||
message?: string,
|
||||
buttonPositive?: string,
|
||||
buttonNegative?: string,
|
||||
buttonNeutral?: string,
|
||||
items?: Array<string>,
|
||||
cancelable?: boolean,
|
||||
|};
|
||||
|
||||
export interface Spec extends TurboModule {
|
||||
+getConstants: () => {|
|
||||
+buttonClicked: DialogAction,
|
||||
+dismissed: DialogAction,
|
||||
+buttonPositive: DialogButtonKey,
|
||||
+buttonNegative: DialogButtonKey,
|
||||
+buttonNeutral: DialogButtonKey,
|
||||
|};
|
||||
+showAlert: (
|
||||
config: DialogOptions,
|
||||
onError: (error: string) => void,
|
||||
onAction: (action: DialogAction, buttonKey?: DialogButtonKey) => void,
|
||||
) => void;
|
||||
}
|
||||
|
||||
export default (TurboModuleRegistry.get<Spec>('DialogManagerAndroid'): ?Spec);
|
||||
export * from '../../../src/private/specs/modules/NativeDialogManagerAndroid';
|
||||
import NativeDialogManagerAndroid from '../../../src/private/specs/modules/NativeDialogManagerAndroid';
|
||||
export default NativeDialogManagerAndroid;
|
||||
Reference in new issue
Block a user