Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shakram02/0f4288908a764cf8bf74a5c40db92672 to your computer and use it in GitHub Desktop.
Save shakram02/0f4288908a764cf8bf74a5c40db92672 to your computer and use it in GitHub Desktop.
Scroll view with header and confirm button
import { ScrollView, Text, TouchableOpacity, View } from "react-native";
export function ListScreen() {
const data = [...Array(30).keys()]
return <View style={{ flex: 1, flexDirection: 'column' }}>
<View style={{ flex: 1, justifyContent: 'space-between', alignItems: 'baseline' }}>
<Text>Your Subscriptions</Text>
<TouchableOpacity>
<Text>Request</Text>
</TouchableOpacity>
</View>
<View style={{ flex: 10 }}>
<ScrollView >
{
data.map((item, i) =>
<Text key={i}>item</Text>)
}
</ScrollView>
</View>
<View style={{ flex: 1, justifyContent: 'center' }} >
<TouchableOpacity>
<Text > Confirm </Text>
</TouchableOpacity>
</View>
</View>;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment