forked from callstackincubator/react-native-grab
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.ts
More file actions
36 lines (29 loc) · 1.33 KB
/
index.ts
File metadata and controls
36 lines (29 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import type { ReactNativeGrabRootProps } from "./grab-root";
import type { ReactNativeGrabScreenProps } from "./grab-screen";
import type {
ReactNativeGrabContextProviderProps,
ReactNativeGrabContextValue,
} from "./grab-context";
import type { ReactNode } from "react";
export type { ReactNativeGrabRootProps } from "./grab-root";
export type { ReactNativeGrabScreenProps } from "./grab-screen";
export type {
ReactNativeGrabContextProviderProps,
ReactNativeGrabContextValue,
} from "./grab-context";
const noop = () => {};
const Passthrough = ({ children }: { children?: ReactNode }) => children;
export const ReactNativeGrabRoot: React.ComponentType<ReactNativeGrabRootProps> = __DEV__
? require("./grab-root").ReactNativeGrabRoot
: Passthrough;
export const ReactNativeGrabScreen: React.ComponentType<ReactNativeGrabScreenProps> = __DEV__
? require("./grab-screen").ReactNativeGrabScreen
: Passthrough;
export const ReactNativeGrabContextProvider: React.ComponentType<ReactNativeGrabContextProviderProps> =
__DEV__ ? require("./grab-context").ReactNativeGrabContextProvider : Passthrough;
export const enableGrabbing: () => void = __DEV__
? require("./grab-controller").enableGrabbing
: noop;
export const setFocusEffect: (impl: (cb: () => void) => void) => void = __DEV__
? require("./focus-effect").setFocusEffect
: noop;