mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-09-04 16:17:06 +02:00
Add user list component + snap to user functionality (#1749)
This commit is contained in:
23
src/components/UserList.tsx
Normal file
23
src/components/UserList.tsx
Normal file
@@ -0,0 +1,23 @@
|
||||
import "./UserList.css";
|
||||
|
||||
import React from "react";
|
||||
|
||||
type UserListProps = {
|
||||
children: React.ReactNode;
|
||||
className?: string;
|
||||
mobile?: boolean;
|
||||
};
|
||||
|
||||
export const UserList = ({ children, className, mobile }: UserListProps) => {
|
||||
let compClassName = "UserList";
|
||||
|
||||
if (className) {
|
||||
compClassName += ` ${className}`;
|
||||
}
|
||||
|
||||
if (mobile) {
|
||||
compClassName += " UserList_mobile";
|
||||
}
|
||||
|
||||
return <div className={compClassName}>{children}</div>;
|
||||
};
|
Reference in New Issue
Block a user