make tab bar scroll view draggable on web
This commit is contained in:
parent
7e555ecc1b
commit
32c9dabb74
5 changed files with 130 additions and 3 deletions
|
@ -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>
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue