mirror of
https://gitlab.com/wheres-the-tp/ui-mobile.git
synced 2026-01-25 07:34:55 -06:00
30 lines
542 B
JavaScript
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;
|