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.
44 lines
1017 B
TypeScript
44 lines
1017 B
TypeScript
1 year ago
|
import { UserToFollow } from "../../types";
|
||
|
import { CloseIcon } from "../icons";
|
||
|
import "./FollowMode.scss";
|
||
|
|
||
|
interface FollowModeProps {
|
||
|
width: number;
|
||
|
height: number;
|
||
|
userToFollow: UserToFollow;
|
||
|
onDisconnect: () => void;
|
||
|
}
|
||
|
|
||
|
const FollowMode = ({
|
||
|
height,
|
||
|
width,
|
||
|
userToFollow,
|
||
|
onDisconnect,
|
||
|
}: FollowModeProps) => {
|
||
|
return (
|
||
|
<div style={{ position: "relative" }}>
|
||
|
<div className="follow-mode" style={{ width, height }}>
|
||
|
<div className="follow-mode__badge">
|
||
|
<div className="follow-mode__badge__label">
|
||
|
Following{" "}
|
||
|
<span
|
||
|
className="follow-mode__badge__username"
|
||
|
title={userToFollow.username}
|
||
|
>
|
||
|
{userToFollow.username}
|
||
|
</span>
|
||
|
</div>
|
||
|
<button
|
||
|
onClick={onDisconnect}
|
||
|
className="follow-mode__disconnect-btn"
|
||
|
>
|
||
|
{CloseIcon}
|
||
|
</button>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
);
|
||
|
};
|
||
|
|
||
|
export default FollowMode;
|