aretherecookies-mobile/js/components/CountBadge.js
Bart Akeley 8da242a11c require login for quantity updates and item creation
requires corresponding backend updates
2018-01-27 16:56:01 -06:00

30 lines
542 B
JavaScript

// @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,
}) => (
<View
style={{
backgroundColor,
position: 'absolute',
bottom: 15,
left: 15,
padding: 5,
borderRadius: 5,
}}>
<Text style={{ color: textColor }}>
{currentImage}/{totalCount}
</Text>
</View>
);
export default CountBadge;