This commit is contained in:
Dan Abramov
2023-12-07 05:54:27 +00:00
parent e4cc7ea409
commit 87e40a6bac
+5 -10
View File
@@ -258,14 +258,11 @@ let PagerTabBar = ({
return ( return (
<Animated.View <Animated.View
pointerEvents="box-none" pointerEvents="box-none"
style={ style={[
isWeb isMobile ? styles.tabBarMobile : styles.tabBarDesktop,
? [] isWeb ? null : headerTransform,
: [ isWeb ? null : {position: 'absolute'},
isMobile ? styles.tabBarMobile : styles.tabBarDesktop, ]}>
headerTransform,
]
}>
<View onLayout={onHeaderOnlyLayout} pointerEvents="box-none"> <View onLayout={onHeaderOnlyLayout} pointerEvents="box-none">
{renderHeader?.()} {renderHeader?.()}
</View> </View>
@@ -335,14 +332,12 @@ function PagerItem({
const styles = StyleSheet.create({ const styles = StyleSheet.create({
tabBarMobile: { tabBarMobile: {
position: 'absolute',
zIndex: 1, zIndex: 1,
top: 0, top: 0,
left: 0, left: 0,
width: '100%', width: '100%',
}, },
tabBarDesktop: { tabBarDesktop: {
position: 'absolute',
zIndex: 1, zIndex: 1,
top: 0, top: 0,
// @ts-ignore Web only -prf // @ts-ignore Web only -prf