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/client/components/basic/UserStatus.js

23 lines
580 B

import React from 'react';
import { Box } from '@rocket.chat/fuselage';
const Base = (props) => <Box size='x12' borderRadius='full' flexShrink={0} {...props}/>;
export const Busy = () => <Base bg='danger-500'/>;
export const Away = () => <Base bg='warning-600'/>;
export const Online = () => <Base bg='success-500'/>;
export const Offline = () => <Base bg='neutral-600'/>;
export const getStatus = (status) => {
switch (status) {
case 'online':
return <Online/>;
case 'busy':
return <Busy/>;
case 'away':
return <Away/>;
default:
return <Offline/>;
}
};