index.js
767 Bytes
import React from 'react'
import {
View,
Text
} from 'react-native'
import { Icon } from 'react-native-elements'
import css from './style'
export default ({ page, totalPages, next, previous, totalCount }) => (
<View style={[css.pane, css.view]}>
<View style={css.paginationIcons}>
{
page > 1 ?
<Icon name='chevron-left' onPress={previous} /> :
<Icon />
}
<Text>{page}</Text>
{
page < totalPages ?
<Icon name='chevron-right' onPress={next} /> :
<Icon />
}
</View>
<View style={css.paginationMeta}>
<Text style={css.paginationMetaText}>
Pagina: {page} de {totalPages}.
Total de Resultados: {totalCount}
</Text>
</View>
</View>
)