import React from 'react'; import { StyleProp, TextStyle } from 'react-native'; import { CustomIcon } from '../../lib/Icons'; import { STATUS_COLORS } from '../../lib/constants'; 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;