The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/apps/meteor/client/components/deviceManagement/DeviceIcon.tsx

28 lines
652 B

import { Box, Icon } from '@rocket.chat/fuselage';
import type { Keys as IconName } from '@rocket.chat/icons';
import type { ReactElement } from 'react';
const iconMap: Record<string, IconName> = {
'browser': 'desktop',
'mobile': 'mobile',
'desktop-app': 'desktop',
'mobile-app': 'mobile',
};
const DeviceIcon = ({ deviceType }: { deviceType: string }): ReactElement => (
<Box
is='span'
display='inline-flex'
alignItems='center'
justifyContent='center'
p={4}
bg='selected'
size='x24'
borderRadius='full'
mie={8}
>
<Icon name={iconMap[deviceType] || 'globe'} size='x16' color='hint' />
</Box>
);
export default DeviceIcon;