Added missing files

This commit is contained in:
mrfry 2020-11-28 16:49:52 +01:00
parent 4f12a18e28
commit db5aad0f8c
5 changed files with 253 additions and 0 deletions

View file

@ -0,0 +1,34 @@
import React from 'react'
import styles from './todoRow.module.css'
export default function TodoRow(props) {
const { categories, userId } = props
const { name, description, category, votes, id } = props.rowData
const voted = votes.includes(userId)
return (
<div
className={`${styles.row} ${voted && styles.voted}`}
title={description}
>
<div className={styles.id}>{`#${id}`}</div>
<div className={styles.description}>{name}</div>
<div className={styles.catName}>
<div
style={{
wordBreak: 'break-all',
fontSize: '10px',
backgroundColor: categories[category].color,
color: 'white',
borderRadius: '2px',
padding: '0px 2px',
}}
>
{categories[category].name}
</div>
</div>
<div className={styles.votes}>{`Votes: ${votes.length}`}</div>
</div>
)
}