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; position: absolute;
right: 2px; right: 2px;
top: 2px; top: 2px;
z-index: 10; z-index: 100;
&:hover { &:hover {
background-color: ${props => mixin.darken('#262c49', 0.45)}; background-color: ${props => mixin.darken('#262c49', .25)};
} }
`; `;

View File

@ -132,7 +132,12 @@ const Card = React.forwardRef(
> >
<ListCardInnerContainer ref={$innerCardRef}> <ListCardInnerContainer ref={$innerCardRef}>
{isActive && ( {isActive && (
<ListCardOperation> <ListCardOperation onClick={e => {
e.stopPropagation();
if (onContextMenu) {
onContextMenu($innerCardRef, taskID, taskGroupID);
}
}}>
<FontAwesomeIcon onClick={onOperationClick} color="#c2c6dc" size="xs" icon={faPencilAlt} /> <FontAwesomeIcon onClick={onOperationClick} color="#c2c6dc" size="xs" icon={faPencilAlt} />
</ListCardOperation> </ListCardOperation>
)} )}