UserStatus.tsx
537 Bytes
import React from 'react';
import { User } from './types';
interface UserStatusProps {
user: User;
}
export const UserStatus: React.FC<UserStatusProps> = ({ user }) => {
return (
<div className='p-3 h-12 m-4 rounded-lg shadow'>
<div className={`${user.admin ? 'text-blue-500' :
user.ready ? 'text-green-500' : 'text-black'}
text-lg text-center align-middle
ease-linear transition-all duration-100`}>
{user.username}</div>
</div>
)
}