// @ts-ignore import React from 'react'; import { StyleProp, Text, TextStyle, View } from 'react-native'; // @ts-ignore import { navigationStyles } from './styles'; interface ITabBarLabelCounterProps { activeUnreadNr: boolean; isFocused: boolean; label: string; nbUnread?: number; } export const TabBarLabelCounter = ({ activeUnreadNr, isFocused, label, nbUnread }: ITabBarLabelCounterProps) => { const labelStyles = isFocused ? navigationStyles.unreadCounterDescriptionFocused : navigationStyles.unreadCounterDescription; return ( }> { label && label } { activeUnreadNr && ( }> }> { nbUnread } ) } ); };