chore: fix scrolling in web examples (#8020)

This commit is contained in:
Evan Bacon
2020-04-30 04:06:11 -07:00
committed by Satyajit Sahoo
parent 3193a30da6
commit 1e73fed6de
6 changed files with 44 additions and 17 deletions

View File

@@ -20,6 +20,8 @@ type SimpleStackParams = {
type SimpleStackNavigation = StackNavigationProp<SimpleStackParams>;
const scrollEnabled = Platform.select({ web: true, default: false });
const ArticleScreen = ({
navigation,
route,
@@ -45,7 +47,10 @@ const ArticleScreen = ({
Go back
</Button>
</View>
<Article author={{ name: route.params.author }} scrollEnabled={false} />
<Article
author={{ name: route.params.author }}
scrollEnabled={scrollEnabled}
/>
</ScrollView>
);
};
@@ -75,7 +80,7 @@ const AlbumsScreen = ({
Go back
</Button>
</View>
<Albums scrollEnabled={false} />
<Albums scrollEnabled={scrollEnabled} />
</ScrollView>
);
};