Add support for changed items

This commit is contained in:
Tom Raithel
2017-11-24 16:09:22 +01:00
parent a75092ccfc
commit 784a5d1be6
8 changed files with 268 additions and 179 deletions

15
js/components/Tag.js Normal file
View File

@@ -0,0 +1,15 @@
import React from 'react';
export default function Tag({ item, short = false }) {
if (item.flag !== 'default') {
let name = item.flag.toUpperCase();
if (short === true) {
name = {
new: 'N',
changed: 'C',
}[item.flag];
}
return <span className={`tag tag--${item.flag}`}>{name}</span>;
}
return null;
}