1import React from 'react';
2import { View, ScrollView, StyleSheet } from 'react-native';
3import { NavigationScreenProps } from 'react-navigation';
4
5import ListButton from '../../components/ListButton';
6import GLScreens from './GLScreens';
7
8export default class GLScreen extends React.Component<NavigationScreenProps> {
9  static navigationOptions = {
10    title: 'Examples of GL use',
11  };
12  static path = 'GL';
13
14  render() {
15    return (
16      <ScrollView style={styles.container}>
17        {Object.keys(GLScreens).map(screenName => (
18          <View key={screenName} style={{ padding: 10 }}>
19            <ListButton
20              onPress={() => this.props.navigation.navigate(screenName)}
21              title={GLScreens[screenName].screen.title}
22            />
23          </View>
24        ))}
25      </ScrollView>
26    );
27  }
28}
29
30const styles = StyleSheet.create({
31  container: {
32    flex: 1,
33  },
34});
35