diff options
author | Hailey <me@haileyok.com> | 2024-02-20 11:38:56 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-20 11:38:56 -0800 |
commit | fab6c286f46e9e491dfeed76291adeae6832d8ef (patch) | |
tree | 3b5aaecfb5bab409ac18ee33988a8529066902cc /src/view/com/util/EventStopper.tsx | |
parent | 09eee05f8b18b775550ca8b5b023562124c24072 (diff) | |
download | voidsky-fab6c286f46e9e491dfeed76291adeae6832d8ef.tar.zst |
Remove async resizing from external embed player (#2936)
* remove debug adjust youtube shorts height fix webview style simplify styles fix resizing make it more clear remove async resizes from external player * remove comment * ts * reverse aspect
Diffstat (limited to 'src/view/com/util/EventStopper.tsx')
-rw-r--r-- | src/view/com/util/EventStopper.tsx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/view/com/util/EventStopper.tsx b/src/view/com/util/EventStopper.tsx index 1e672e945..e743e89bb 100644 --- a/src/view/com/util/EventStopper.tsx +++ b/src/view/com/util/EventStopper.tsx @@ -1,11 +1,14 @@ import React from 'react' -import {View} from 'react-native' +import {View, ViewStyle} from 'react-native' /** * This utility function captures events and stops * them from propagating upwards. */ -export function EventStopper({children}: React.PropsWithChildren<{}>) { +export function EventStopper({ + children, + style, +}: React.PropsWithChildren<{style?: ViewStyle | ViewStyle[]}>) { const stop = (e: any) => { e.stopPropagation() } @@ -15,7 +18,8 @@ export function EventStopper({children}: React.PropsWithChildren<{}>) { onTouchEnd={stop} // @ts-ignore web only -prf onClick={stop} - onKeyDown={stop}> + onKeyDown={stop} + style={style}> {children} </View> ) |