Icon updates

This commit is contained in:
Elio Struyf
2021-07-20 16:12:29 +02:00
parent a3f18bb143
commit c572a821e9
3 changed files with 16 additions and 15 deletions
+2 -4
View File
@@ -1,7 +1,6 @@
import * as React from 'react';
import AddIcon from '@material-ui/icons/Add';
import DeleteIcon from '@material-ui/icons/Delete';
import { Icon } from './Icon';
export interface ITagProps {
className: string;
@@ -19,10 +18,9 @@ export const Tag: React.FunctionComponent<ITagProps> = (props: React.PropsWithCh
<div className={`article__tags__items__item`}>
{
onCreate &&
<button title={`Add ${value} to your settings`} className={`article__tags__items__item_add`} onClick={() => onCreate(value)}><Icon name="add" /></button>
<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} <Icon name={`archive`} /></button>
<button title={title} className={`article__tags__items__item_delete ${className}`} onClick={() => onRemove(value)}>{value} <span><DeleteIcon /></span></button>
</div>
);
};
+4 -2
View File
@@ -6,6 +6,7 @@ import { TagType } from '../TagType';
import { MessageHelper } from '../helper/MessageHelper';
import Downshift from 'downshift';
import LocalOfferTwoToneIcon from '@material-ui/icons/LocalOfferTwoTone';
import { Icon } from './Icon';
export interface ITagPickerProps {
type: string;
@@ -146,10 +147,11 @@ export const TagPicker: React.FunctionComponent<ITagPickerProps> = (props: React
{
freeform && (
<button title={`Add the unknown tag`}
<button className={`article__tags__input__button`}
title={`Add the unknown tag`}
disabled={!inputValue}
onClick={() => insertUnkownTag(closeMenu)}>
<LocalOfferTwoToneIcon />
<Icon name="tag" />
</button>
)
}