Created tags list page

This commit is contained in:
Alejandro Celaya
2018-08-16 18:59:00 +02:00
parent 03113583f0
commit 49290b56ee
12 changed files with 150 additions and 8 deletions

View File

@@ -6,6 +6,7 @@ export default function Tag (
{
colorGenerator,
text,
children,
clearable,
onClick = () => ({}),
onClose = () => ({})
@@ -17,7 +18,7 @@ export default function Tag (
style={{ backgroundColor: colorGenerator.getColorForKey(text), cursor: clearable ? 'auto' : 'pointer' }}
onClick={onClick}
>
{text}
{children || text}
{clearable && <span className="close tag__close-selected-tag" onClick={onClose}>&times;</span>}
</span>
);