diff options
Diffstat (limited to 'packages/excalidraw/components/FollowMode/FollowMode.tsx')
| -rw-r--r-- | packages/excalidraw/components/FollowMode/FollowMode.tsx | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/packages/excalidraw/components/FollowMode/FollowMode.tsx b/packages/excalidraw/components/FollowMode/FollowMode.tsx new file mode 100644 index 0000000..89581bf --- /dev/null +++ b/packages/excalidraw/components/FollowMode/FollowMode.tsx @@ -0,0 +1,42 @@ +import type { 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 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 + type="button" + onClick={onDisconnect} + className="follow-mode__disconnect-btn" + > + {CloseIcon} + </button> + </div> + </div> + ); +}; + +export default FollowMode; |
