mirror of https://github.com/msgbyte/tailchat
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
560 B
TypeScript
24 lines
560 B
TypeScript
import React from 'react';
|
|
import './ServerItem.css';
|
|
|
|
export const ServerItem: React.FC<
|
|
React.PropsWithChildren<{
|
|
icon: string;
|
|
version?: string;
|
|
onClick: () => void;
|
|
}>
|
|
> = React.memo((props) => {
|
|
return (
|
|
<div className="server-item" onClick={props.onClick}>
|
|
<div>
|
|
<img width="60px" height="60px" alt="icon" src={props.icon} />
|
|
</div>
|
|
<div>{props.children}</div>
|
|
<div>
|
|
<small title={props.version}>{props.version}</small>
|
|
</div>
|
|
</div>
|
|
);
|
|
});
|
|
ServerItem.displayName = 'ServerItem';
|