mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Add user list component + snap to user functionality (#1749)
This commit is contained in:
parent
8f65e37dac
commit
ca87ca6fe9
18 changed files with 333 additions and 32 deletions
25
src/components/Avatar.tsx
Normal file
25
src/components/Avatar.tsx
Normal file
|
@ -0,0 +1,25 @@
|
|||
import "./Avatar.scss";
|
||||
|
||||
import React from "react";
|
||||
|
||||
type AvatarProps = {
|
||||
children: string;
|
||||
className?: string;
|
||||
onClick: (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
||||
color: string;
|
||||
};
|
||||
|
||||
export const Avatar = ({
|
||||
children,
|
||||
className,
|
||||
color,
|
||||
onClick,
|
||||
}: AvatarProps) => (
|
||||
<div
|
||||
className={`Avatar ${className}`}
|
||||
style={{ background: color }}
|
||||
onClick={onClick}
|
||||
>
|
||||
{children}
|
||||
</div>
|
||||
);
|
Loading…
Add table
Add a link
Reference in a new issue