UNPKG

npmchenwei111

Version:

test1111

38 lines (35 loc) 828 B
/** * Created by apple on 2017/7/17. */ import React, { Component } from 'react' import { StyleSheet, Text, View } from 'react-native' import { sp } from '../../utils/Px2dp' class NumberPageIndicatorView extends Component { render () { return ( <View style={[this.props.style, styles.content]}> <Text style={styles.pageIndicatorBig}> {this.props.currentPage }/ </Text> <Text style={styles.pageIndicatorSmall}> {this.props.totalPage} </Text> </View> ) } } const styles = StyleSheet.create({ pageIndicatorBig: { color: '#ffffff', fontSize: sp(36), }, pageIndicatorSmall: { color: '#ffffff', fontSize: sp(24), }, content: { flexDirection: 'row', alignItems: 'baseline', }, }) export default NumberPageIndicatorView