aretherecookies-mobile/js/components/ImagesCountBadge.js

25 lines
494 B
JavaScript
Raw Permalink Normal View History

2017-04-20 16:28:13 -05:00
// @flow
import React from 'react';
import { View, Text } from 'react-native';
type Props = { currentImage: number, totalCount: number, color: string };
const ImagesCountBadge = ({ currentImage, totalCount, color }: Props) => (
<View
style={{
backgroundColor: color,
position: 'absolute',
bottom: 15,
left: 15,
padding: 5,
borderRadius: 5,
}}
>
<Text style={{ color: 'white' }}>
{currentImage}/{totalCount}
</Text>
</View>
);
export default ImagesCountBadge;