UNPKG

@uiw/react-native

Version:
49 lines (47 loc) 1.21 kB
import React from 'react'; import { View, StyleSheet, Text } from 'react-native'; import { containerStyle, containerSize, contentSize } from './DirText'; import Button from '../Button'; const Page = props => { const { size, currentColor, current, totalPage } = props; const textSize = size === 'small' ? 1 : 2; return <View style={[styles.containerStyle, { minWidth: containerSize[size], height: containerSize[size], borderWidth: 0, flexShrink: 0 }]}> <Button bordered={false}> <Text style={{ color: currentColor ?? '#46a6ff', fontSize: contentSize[size], lineHeight: contentSize[size] + textSize }}> {current} </Text> <Text style={{ color: currentColor ?? '#46a6ff', fontSize: contentSize[size] - 1, lineHeight: contentSize[size] - textSize }}> / </Text> <Text style={{ color: '#3d3d3d', fontSize: contentSize[size], lineHeight: contentSize[size] + textSize }}> {totalPage} </Text> </Button> </View>; }; const styles = StyleSheet.create({ containerStyle }); export default Page;