feat: public view

This commit is contained in:
cv
2021-04-25 23:58:41 +02:00
parent 116708726b
commit 24187b29eb
10 changed files with 303 additions and 5 deletions
@@ -0,0 +1,21 @@
import { stringFromMillis } from '../../../common/dateConfig';
import style from './Paginator.module.css';
export default function TodayItem(props) {
const { selected, timeStart, timeEnd, title } = props;
// Format timers
const start = stringFromMillis(timeStart, false) || '';
const end = stringFromMillis(timeEnd, false) || '';
// select styling
let selectStyle = style.entryPast;
if (selected === 1) selectStyle = style.entryNow;
else if (selected === 2) selectStyle = style.entryFuture;
return (
<div className={selectStyle}>
<div className={style.entryStart}>{start}</div>
<div className={style.entryEnd}>{end}</div>
<div className={style.entryTitle}>{title}</div>
</div>
);
}