Add support for changed items
This commit is contained in:
15
js/components/Tag.js
Normal file
15
js/components/Tag.js
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user