diff --git a/ios/ReactNativeIosModalModule.swift b/ios/ReactNativeIosModalModule.swift deleted file mode 100644 index 7fb15403..00000000 --- a/ios/ReactNativeIosModalModule.swift +++ /dev/null @@ -1,51 +0,0 @@ -// -// ReactNativeIosModalModule.swift -// ReactNativeIosModal -// -// Created by Dominic Go on 10/6/23. -// - -import ExpoModulesCore - -public class ReactNativeIosModalModule: Module { - // Each module class must implement the definition function. The definition consists of components - // that describes the module's functionality and behavior. - // See https://docs.expo.dev/modules/module-api for more details about available components. - public func definition() -> ModuleDefinition { - // Sets the name of the module that JavaScript code will use to refer to the module. Takes a string as an argument. - // Can be inferred from module's class name, but it's recommended to set it explicitly for clarity. - // The module will be accessible from `requireNativeModule('ReactNativeIosModal')` in JavaScript. - Name("ReactNativeIosModal") - - // Sets constant properties on the module. Can take a dictionary or a closure that returns a dictionary. - Constants([ - "PI": Double.pi - ]) - - // Defines event names that the module can send to JavaScript. - Events("onChange") - - // Defines a JavaScript synchronous function that runs the native code on the JavaScript thread. - Function("hello") { - return "Hello world! 👋" - } - - // Defines a JavaScript function that always returns a Promise and whose native code - // is by default dispatched on the different thread than the JavaScript runtime runs on. - AsyncFunction("setValueAsync") { (value: String) in - // Send an event to JavaScript. - self.sendEvent("onChange", [ - "value": value - ]) - } - - // Enables the module to be used as a native view. Definition components that are accepted as part of the - // view definition: Prop, Events. - View(ReactNativeIosModalView.self) { - // Defines a setter for the `name` prop. - Prop("name") { (view: ReactNativeIosModalView, prop: String) in - print(prop) - } - } - } -} diff --git a/ios/ReactNativeIosModalView.swift b/ios/ReactNativeIosModalView.swift deleted file mode 100644 index b925ac22..00000000 --- a/ios/ReactNativeIosModalView.swift +++ /dev/null @@ -1,14 +0,0 @@ -// -// ReactNativeIosModalView.swift -// ReactNativeIosModal -// -// Created by Dominic Go on 10/6/23. -// - -import ExpoModulesCore - -// This view will be used as a native component. Make sure to inherit from `ExpoView` -// to apply the proper styling (e.g. border radius and shadows). -class ReactNativeIosModalView: ExpoView { - -} diff --git a/src/ReactNativeIosModal.types.ts b/src/ReactNativeIosModal.types.ts deleted file mode 100644 index 6f51c72e..00000000 --- a/src/ReactNativeIosModal.types.ts +++ /dev/null @@ -1,7 +0,0 @@ -export type ChangeEventPayload = { - value: string; -}; - -export type ReactNativeIosModalViewProps = { - name: string; -}; diff --git a/src/ReactNativeIosModalModule.ts b/src/ReactNativeIosModalModule.ts deleted file mode 100644 index c1bb14be..00000000 --- a/src/ReactNativeIosModalModule.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { requireNativeModule } from 'expo-modules-core'; - -// It loads the native module object from the JSI or falls back to -// the bridge module (from NativeModulesProxy) if the remote debugger is on. -export default requireNativeModule('ReactNativeIosModal'); diff --git a/src/ReactNativeIosModalModule.web.ts b/src/ReactNativeIosModalModule.web.ts deleted file mode 100644 index be76495b..00000000 --- a/src/ReactNativeIosModalModule.web.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { EventEmitter } from 'expo-modules-core'; - -const emitter = new EventEmitter({} as any); - -export default { - PI: Math.PI, - async setValueAsync(value: string): Promise { - emitter.emit('onChange', { value }); - }, - hello() { - return 'Hello world! 👋'; - }, -}; diff --git a/src/ReactNativeIosModalView.tsx b/src/ReactNativeIosModalView.tsx deleted file mode 100644 index 8eab6404..00000000 --- a/src/ReactNativeIosModalView.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import { requireNativeViewManager } from 'expo-modules-core'; -import * as React from 'react'; - -import { ReactNativeIosModalViewProps } from './ReactNativeIosModal.types'; - -const NativeView: React.ComponentType = - requireNativeViewManager('ReactNativeIosModal'); - -export default function ReactNativeIosModalView(props: ReactNativeIosModalViewProps) { - return ; -} diff --git a/src/ReactNativeIosModalView.web.tsx b/src/ReactNativeIosModalView.web.tsx deleted file mode 100644 index 15100c40..00000000 --- a/src/ReactNativeIosModalView.web.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import * as React from 'react'; - -import { ReactNativeIosModalViewProps } from './ReactNativeIosModal.types'; - -export default function ReactNativeIosModalView(props: ReactNativeIosModalViewProps) { - return ( -
- {props.name} -
- ); -}