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/ee/client/deviceManagement/components/DeviceIcon.tsx

28 lines
664 B

import { Box, Icon } from '@rocket.chat/fuselage';
import type { ComponentProps, ReactElement } from 'react';
import React from 'react';
const iconMap: Record<string, ComponentProps<typeof Icon>['name']> = {
'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='x4'
bg='selected'
size='x24'
borderRadius='full'
mie='x8'
>
<Icon name={iconMap[deviceType] || 'globe'} size='x16' color='hint' />
</Box>
);
export default DeviceIcon;