diff options
author | Ansh Nanda <anshnanda10@gmail.com> | 2023-05-24 15:04:30 -0700 |
---|---|---|
committer | Ansh Nanda <anshnanda10@gmail.com> | 2023-05-24 15:04:30 -0700 |
commit | 32c9dabb7467149baf39d8f5c2eb3d0b81236d92 (patch) | |
tree | 4e6fc79bd3fe824d60b748d8fbb85159406fcd44 /src/view/com/pager/TabBar.tsx | |
parent | 7e555ecc1b04fed96192d3c68b87cf679993abfa (diff) | |
download | voidsky-32c9dabb7467149baf39d8f5c2eb3d0b81236d92.tar.zst |
make tab bar scroll view draggable on web
Diffstat (limited to 'src/view/com/pager/TabBar.tsx')
-rw-r--r-- | src/view/com/pager/TabBar.tsx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/view/com/pager/TabBar.tsx b/src/view/com/pager/TabBar.tsx index 485219730..cebf58b48 100644 --- a/src/view/com/pager/TabBar.tsx +++ b/src/view/com/pager/TabBar.tsx @@ -11,6 +11,7 @@ import {Text} from '../util/text/Text' import {PressableWithHover} from '../util/PressableWithHover' import {usePalette} from 'lib/hooks/usePalette' import {isDesktopWeb} from 'platform/detection' +import {DraggableScrollView} from './DraggableScrollView' export interface TabBarProps { testID?: string @@ -75,7 +76,7 @@ export function TabBar({ return ( <View testID={testID} style={[pal.view, styles.outer]}> - <ScrollView + <DraggableScrollView horizontal={true} showsHorizontalScrollIndicator={false} ref={scrollElRef} @@ -98,7 +99,7 @@ export function TabBar({ </PressableWithHover> ) })} - </ScrollView> + </DraggableScrollView> </View> ) } |