{"size": 1062, "ext": "js", "max_stars_repo_path": "exercicio1/src/components/ListaAluno.js", "max_stars_repo_name": "santana-devin/Cod3r---Fundamentos-de-React-Native", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "exercicio1/src/components/ListaAluno.js", "max_issues_repo_name": "santana-devin/Cod3r---Fundamentos-de-React-Native", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "exercicio1/src/components/ListaAluno.js", "max_forks_repo_name": "santana-devin/Cod3r---Fundamentos-de-React-Native", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 22.125, "max_line_length": 64, "alphanum_fraction": 0.5828625235}
import React from 'react';
import {ScrollView, View, Text, FlatList} from 'react-native';

const alunos = [
  {id: 1, nome: 'Fabrício', nota: 3.3},
  {id: 2, nome: 'Davi', nota: 3.3},
  {id: 3, nome: 'Ricardo', nota: 3.3},
  {id: 4, nome: 'Alessandra', nota: 3.3},
  {id: 5, nome: 'Pedro', nota: 3.3},
  {id: 6, nome: 'Felipe', nota: 3.3},
];

const itemStyle = {
  paddingHorizontal: 15,
  heght: 50,
  backgroundColor: '#DDD',
  borderWight: 0.5,
  borderColor: '#222',

  JustifyContent: 'space-around',
  alingItens: 'center',
  flexDitection: 'row',
  justifyContent: 'space-between',
};

export const Alunos = (props) => (
  <View style={itemStyle}>
    <Text>Nome: {props.nome}</Text>
    <Text style={{fontWeight: 'bold'}}>Nota: {props.nota}</Text>
  </View>
);

export default (props) => {
  const renderItens = ({item}) => {
    return <Alunos {...item} />;
  };

  return (
    <ScrollView>
      <FlatList
        data={alunos}
        renderItem={renderItens}
        keyExtractor={(_, index) => index.toString()}
      />
    </ScrollView>
  );
};
