diff --git a/src/Icons.js b/src/Icons.js index bee9ec7..71964ad 100644 --- a/src/Icons.js +++ b/src/Icons.js @@ -1,11 +1,11 @@ import React from 'react'; /** - * Icons from IcoFont https://icofont.com/, licensed under the CC BY 4.0 license. + * Icon from IcoFont https://icofont.com/, licensed under the CC BY 4.0 license. */ -export const ChevronDown = props => { +export const ChevronDownIcon = props => { return ( - + IcoFont Icons simple-down @@ -14,7 +14,10 @@ export const ChevronDown = props => { ) } -export const Close = props => { +/** + * Icon from IcoFont https://icofont.com/, licensed under the CC BY 4.0 license. + */ +export const CloseIcon = props => { return ( IcoFont Icons @@ -23,4 +26,31 @@ export const Close = props => { ) +} + +/** + * Icon from IcoFont https://icofont.com/, licensed under the CC BY 4.0 license. + */ +export const CheckIcon = props => { + return ( + + IcoFont Icons + verification-check + + + + ) +} + + +/** + * Icon from FontAwesome https://fontawesome.com/icons/trash-alt, + * licensed under the CC BY 4.0 license https://fontawesome.com/license + */ +export const TrashIcon = props => { + return ( + + + + ) } \ No newline at end of file diff --git a/src/editor/widgets/comment/Comment.jsx b/src/editor/widgets/comment/Comment.jsx index c3879c9..52e66be 100644 --- a/src/editor/widgets/comment/Comment.jsx +++ b/src/editor/widgets/comment/Comment.jsx @@ -1,7 +1,7 @@ import React, { useState } from 'react'; import DropdownMenu from './DropdownMenu'; import TextEntryField from './TextEntryField'; -import { ChevronDown } from '../../../Icons'; +import { ChevronDownIcon } from '../../../Icons'; /** A single comment inside the CommentWidget **/ const Comment = props => { @@ -39,7 +39,7 @@ const Comment = props => {
setIsMenuVisible(!isMenuVisible)}> - +
{ isMenuVisible && diff --git a/src/editor/widgets/tag/TagWidget.jsx b/src/editor/widgets/tag/TagWidget.jsx index 38b8140..7343ce2 100644 --- a/src/editor/widgets/tag/TagWidget.jsx +++ b/src/editor/widgets/tag/TagWidget.jsx @@ -1,6 +1,6 @@ import React, { useState, useEffect } from 'react'; import { CSSTransition } from 'react-transition-group'; -import { Close } from '../../../Icons'; +import { CloseIcon } from '../../../Icons'; /** The basic freetext tag control from original Recogito **/ const TagWidget = props => { @@ -41,7 +41,7 @@ const TagWidget = props => { - + diff --git a/src/relations/editor/RelationEditor.jsx b/src/relations/editor/RelationEditor.jsx index b39a2df..84379b2 100644 --- a/src/relations/editor/RelationEditor.jsx +++ b/src/relations/editor/RelationEditor.jsx @@ -1,5 +1,6 @@ import React, { Component } from 'react'; import ContentEditable from 'react-contenteditable'; +import { TrashIcon, CheckIcon } from '../../Icons'; /** * Shorthand to get the label (= first tag body value) from the @@ -112,11 +113,15 @@ export default class RelationEditor extends Component {
{'\uf014'} + onClick={this.onDelete}> + + {'\uf00c'} + onClick={this.onSubmit}> + +
) diff --git a/themes/default/relations/_editor.scss b/themes/default/relations/_editor.scss index dbec303..7c7180c 100644 --- a/themes/default/relations/_editor.scss +++ b/themes/default/relations/_editor.scss @@ -8,6 +8,11 @@ transform:translate(-50%, -50%); background-color:#fff; + svg { + vertical-align:middle; + shape-rendering: geometricPrecision; + } + * { line-height:31px; box-sizing:border-box; @@ -49,7 +54,7 @@ .delete { background-color:#fff; - color:$standard-type; + color:$lightblue-type; border-left:1px solid $lightgrey-border; }