Skip to content

Commit e5c077b

Browse files
kirstilynngorhom
andauthored
fix: conditionally apply web-only cursor style to avoid TypeScript error (#2420)(by @kirstilynn)
* fix: avoid TS error by conditionally applying web-only cursor style * fix(web): apply web-only cursor style safely with TS compatibility * chore: remove created variable for web --------- Co-authored-by: Mo Gorhom <gorhom.dev@gmail.com>
1 parent c9e0473 commit e5c077b

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/components/bottomSheetHandle/styles.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
1-
import { StyleSheet } from 'react-native';
1+
import { Platform, StyleSheet } from 'react-native';
22
import { WINDOW_WIDTH } from '../../constants';
33

4+
45
export const styles = StyleSheet.create({
56
container: {
67
padding: 10,
7-
// @ts-ignore supported on web
8-
cursor: 'grab',
8+
...Platform.select({
9+
web: {
10+
cursor: 'pointer' as const
11+
},
12+
default: {}
13+
}),
914
},
1015

1116
indicator: {

0 commit comments

Comments
 (0)