Added a new tag icon instead of the +

This commit is contained in:
Elio Struyf
2020-12-11 10:10:14 +01:00
parent daac7883b8
commit 976a473d39
3 changed files with 8 additions and 3 deletions

View File

@@ -121,6 +121,8 @@
top: 1px;
right: 1px;
width: 30px;
padding-bottom: 2px;
padding-top: 2px;
}
.article__tags ul {

View File

@@ -1,6 +1,6 @@
import * as React from 'react';
import AddIcon from '@material-ui/icons/Add';
import DeleteIcon from '@material-ui/icons/Delete';
import DeleteForeverTwoToneIcon from '@material-ui/icons/DeleteForeverTwoTone';
export interface ITagProps {
className: string;
@@ -20,7 +20,7 @@ export const Tag: React.FunctionComponent<ITagProps> = (props: React.PropsWithCh
onCreate &&
<button title={`Add ${value} to your settings`} className={`article__tags__items__item_add`} onClick={() => onCreate(value)}><AddIcon /></button>
}
<button title={title} className={`article__tags__items__item_delete ${className}`} onClick={() => onRemove(value)}>{value} <span><DeleteIcon /></span></button>
<button title={title} className={`article__tags__items__item_delete ${className}`} onClick={() => onRemove(value)}>{value} <span><DeleteForeverTwoToneIcon /></span></button>
</div>
);
};

View File

@@ -5,6 +5,7 @@ import { CommandToCode } from '../CommandToCode';
import { TagType } from '../TagType';
import { MessageHelper } from '../helper/MessageHelper';
import Downshift from 'downshift';
import LocalOfferTwoToneIcon from '@material-ui/icons/LocalOfferTwoTone';
export interface ITagPickerProps {
type: string;
@@ -146,7 +147,9 @@ export const TagPicker: React.FunctionComponent<ITagPickerProps> = (props: React
freeform && (
<button title={`Add the unknown tag`}
disabled={!inputValue}
onClick={() => insertUnkownTag(closeMenu)}>+</button>
onClick={() => insertUnkownTag(closeMenu)}>
<LocalOfferTwoToneIcon />
</button>
)
}
</div>