Add user list component + snap to user functionality (#1749)

This commit is contained in:
Oliver Benns 2020-06-19 11:36:49 +01:00 committed by GitHub
parent 8f65e37dac
commit ca87ca6fe9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 333 additions and 32 deletions

25
src/components/Avatar.tsx Normal file
View 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>
);