Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/chrisvander/schedj-frontend. A mobile application for students to access and manage scheduling and
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657/* eslint global-require: "off" */import React from 'react';import { TouchableOpacity, StyleSheet, Text, Image,} from 'react-native';
const icons = { gear: require('../assets/icons/gear.png'), help: require('../assets/icons/help.png'), lock: require('../assets/icons/lock.png'), logout: require('../assets/icons/logout.png'), notification: require('../assets/icons/notification.png'), profile: require('../assets/icons/profile.png'), right_caret: require('../assets/icons/right_caret.png'),};
const styles = StyleSheet.create({ section: { display: 'flex', flexDirection: 'row', width: '100%', paddingLeft: 30, paddingRight: 30, padding: 16, }, icon: { width: 16, height: 16, }, title: { flexGrow: 1, fontSize: 14, fontFamily: 'Arial', fontWeight: 'bold', color: '#2699FB', paddingLeft: 32, },});
export default ({ data }) => ( <React.Fragment> {data.map(section => ( <TouchableOpacity key={section.title} onPress={section.onPress} style={[styles.section]} > <Image style={[styles.icon]} source={icons[section.icon]} /> <Text style={[styles.title]}> {section.title} </Text> <Image source={icons.right_caret} /> </TouchableOpacity> ))} </React.Fragment>);