2017-04-23 20:15:46 -05:00
|
|
|
// @flow
|
|
|
|
|
import React from 'react';
|
|
|
|
|
import { Text, View } from 'react-native';
|
|
|
|
|
import theme from '../ui-theme';
|
|
|
|
|
|
|
|
|
|
const { countBadge: { backgroundColor, textColor } } = theme;
|
|
|
|
|
|
2018-01-27 16:56:01 -06:00
|
|
|
const CountBadge = ({
|
|
|
|
|
currentImage = 1,
|
|
|
|
|
totalCount = 1,
|
|
|
|
|
}: {
|
|
|
|
|
currentImage: number,
|
|
|
|
|
totalCount: number,
|
|
|
|
|
}) => (
|
2017-04-23 20:15:46 -05:00
|
|
|
<View
|
|
|
|
|
style={{
|
|
|
|
|
backgroundColor,
|
|
|
|
|
position: 'absolute',
|
|
|
|
|
bottom: 15,
|
|
|
|
|
left: 15,
|
|
|
|
|
padding: 5,
|
|
|
|
|
borderRadius: 5,
|
2018-01-27 16:56:01 -06:00
|
|
|
}}>
|
2017-04-23 20:15:46 -05:00
|
|
|
<Text style={{ color: textColor }}>
|
|
|
|
|
{currentImage}/{totalCount}
|
|
|
|
|
</Text>
|
|
|
|
|
</View>
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
export default CountBadge;
|