feature: connect card operation icon to quick card editor

This commit is contained in:
Jordan Knott 2020-07-13 16:20:06 -05:00
parent b95cc6859e
commit 609baa98aa
2 changed files with 17 additions and 13 deletions

View File

@ -134,10 +134,9 @@ export const ListCardOperation = styled.span`
position: absolute;
right: 2px;
top: 2px;
z-index: 10;
z-index: 100;
&:hover {
background-color: ${props => mixin.darken('#262c49', 0.45)};
background-color: ${props => mixin.darken('#262c49', .25)};
}
`;

View File

@ -1,8 +1,8 @@
import React, { useState, useRef, useEffect } from 'react';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import React, {useState, useRef, useEffect} from 'react';
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
import TaskAssignee from 'shared/components/TaskAssignee';
import { faPencilAlt, faList } from '@fortawesome/free-solid-svg-icons';
import { faClock, faCheckSquare, faEye } from '@fortawesome/free-regular-svg-icons';
import {faPencilAlt, faList} from '@fortawesome/free-solid-svg-icons';
import {faClock, faCheckSquare, faEye} from '@fortawesome/free-regular-svg-icons';
import {
EditorTextarea,
EditorContent,
@ -132,7 +132,12 @@ const Card = React.forwardRef(
>
<ListCardInnerContainer ref={$innerCardRef}>
{isActive && (
<ListCardOperation>
<ListCardOperation onClick={e => {
e.stopPropagation();
if (onContextMenu) {
onContextMenu($innerCardRef, taskID, taskGroupID);
}
}}>
<FontAwesomeIcon onClick={onOperationClick} color="#c2c6dc" size="xs" icon={faPencilAlt} />
</ListCardOperation>
)}