mirror of
https://github.com/estruyf/vscode-front-matter.git
synced 2026-03-28 17:42:40 +01:00
Added a new tag icon instead of the +
This commit is contained in:
@@ -121,6 +121,8 @@
|
||||
top: 1px;
|
||||
right: 1px;
|
||||
width: 30px;
|
||||
padding-bottom: 2px;
|
||||
padding-top: 2px;
|
||||
}
|
||||
|
||||
.article__tags ul {
|
||||
|
||||
@@ -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>
|
||||
);
|
||||
};
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user