mirror of
https://github.com/umami-software/umami.git
synced 2026-02-12 08:37:13 +01:00
Refactored realtime API. Add dot component and colored dots in log.
This commit is contained in:
parent
f2cfab5078
commit
b72a4c001c
12 changed files with 153 additions and 86 deletions
15
components/common/Dot.js
Normal file
15
components/common/Dot.js
Normal 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',
|
||||
})}
|
||||
/>
|
||||
);
|
||||
}
|
||||
17
components/common/Dot.module.css
Normal file
17
components/common/Dot.module.css
Normal 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;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue