import React from 'react'; import { StyleProp, TextStyle } from 'react-native'; import { CustomIcon } from '../../lib/Icons'; import { STATUS_COLORS } from '../../constants/colors'; interface IStatus { status: string; size: number; style?: StyleProp; testID?: string; } const Status = React.memo(({ style, status = 'offline', size = 32, ...props }: IStatus) => { const name = `status-${status}`; const isNameValid = CustomIcon.hasIcon(name); const iconName = isNameValid ? name : 'status-offline'; const calculatedStyle: StyleProp = [ { width: size, height: size, textAlignVertical: 'center' }, style ]; return ( ); }); export default Status;