import React from 'react'; import { StyleProp, TextStyle } from 'react-native'; import { CustomIcon } from '../../lib/Icons'; import { STATUS_COLORS } from '../../constants/colors'; import { IStatus } from './definition'; const Status = React.memo(({ style, status = 'offline', size = 32, ...props }: Omit) => { 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;