UserStatus.tsx 563 Bytes
import React from 'react';
import { User } from './types';

interface UserStatusProps {
  user: User;
}

const UserStatus: React.FC<UserStatusProps> = ({ user }) => {
  return (
    <div className='p-3 h-12 m-4 mt-8 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.nickname}</div>
    </div>
  )
}

export default UserStatus;