aretherecookies-mobile/js/components/CountBadge.js

31 lines
542 B
JavaScript
Raw Permalink Normal View History

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;
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,
}}>
2017-04-23 20:15:46 -05:00
<Text style={{ color: textColor }}>
{currentImage}/{totalCount}
</Text>
</View>
);
export default CountBadge;