Refactored realtime API. Add dot component and colored dots in log.

This commit is contained in:
Mike Cao 2020-10-10 11:04:07 -07:00
parent f2cfab5078
commit b72a4c001c
12 changed files with 153 additions and 86 deletions

15
components/common/Dot.js Normal file
View file

@ -0,0 +1,15 @@
import React from 'react';
import classNames from 'classnames';
import styles from './Dot.module.css';
export default function Dot({ color, size, className }) {
return (
<div
style={{ background: color }}
className={classNames(styles.dot, className, {
[styles.small]: size === 'small',
[styles.large]: size === 'large',
})}
/>
);
}

View file

@ -0,0 +1,17 @@
.dot {
background: var(--green400);
width: 10px;
height: 10px;
border-radius: 100%;
margin-right: 10px;
}
.dot.small {
width: 8px;
height: 8px;
}
.dot.large {
width: 16px;
height: 16px;
}