fix: update task assignee icon styles
This commit is contained in:
parent
f8a783378a
commit
83765077ff
@ -4,7 +4,14 @@ import { mixin } from 'shared/utils/styles';
|
|||||||
import TextareaAutosize from 'react-autosize-textarea';
|
import TextareaAutosize from 'react-autosize-textarea';
|
||||||
import { CheckCircle, CheckSquare } from 'shared/icons';
|
import { CheckCircle, CheckSquare } from 'shared/icons';
|
||||||
import { RefObject } from 'react';
|
import { RefObject } from 'react';
|
||||||
|
import TaskAssignee from 'shared/components/TaskAssignee';
|
||||||
|
|
||||||
|
export const CardMember = styled(TaskAssignee)<{ zIndex: number }>`
|
||||||
|
box-shadow: 0 0 0 2px rgba(${props => props.theme.colors.bg.secondary}),
|
||||||
|
inset 0 0 0 1px rgba(${props => props.theme.colors.bg.secondary}, 0.07);
|
||||||
|
z-index: ${props => props.zIndex};
|
||||||
|
position: relative;
|
||||||
|
`;
|
||||||
export const ChecklistIcon = styled(CheckSquare)<{ color: 'success' | 'normal' }>`
|
export const ChecklistIcon = styled(CheckSquare)<{ color: 'success' | 'normal' }>`
|
||||||
${props =>
|
${props =>
|
||||||
props.color === 'success' &&
|
props.color === 'success' &&
|
||||||
@ -232,6 +239,7 @@ export const CardTitle = styled.span`
|
|||||||
export const CardMembers = styled.div`
|
export const CardMembers = styled.div`
|
||||||
float: right;
|
float: right;
|
||||||
margin: 0 -2px 4px 0;
|
margin: 0 -2px 4px 0;
|
||||||
|
display: flex;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const CompleteIcon = styled(CheckCircle)`
|
export const CompleteIcon = styled(CheckCircle)`
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import React, { useState, useRef, useEffect } from 'react';
|
import React, { useState, useRef, useEffect } from 'react';
|
||||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||||
import TaskAssignee from 'shared/components/TaskAssignee';
|
|
||||||
import { faPencilAlt, faList } from '@fortawesome/free-solid-svg-icons';
|
import { faPencilAlt, faList } from '@fortawesome/free-solid-svg-icons';
|
||||||
import { faClock, faCheckSquare, faEye } from '@fortawesome/free-regular-svg-icons';
|
import { faClock, faCheckSquare, faEye } from '@fortawesome/free-regular-svg-icons';
|
||||||
import {
|
import {
|
||||||
EditorTextarea,
|
EditorTextarea,
|
||||||
|
CardMember,
|
||||||
EditorContent,
|
EditorContent,
|
||||||
ChecklistIcon,
|
ChecklistIcon,
|
||||||
CompleteIcon,
|
CompleteIcon,
|
||||||
@ -244,10 +244,11 @@ const Card = React.forwardRef(
|
|||||||
</ListCardBadges>
|
</ListCardBadges>
|
||||||
<CardMembers>
|
<CardMembers>
|
||||||
{members &&
|
{members &&
|
||||||
members.map(member => (
|
members.map((member, idx) => (
|
||||||
<TaskAssignee
|
<CardMember
|
||||||
key={member.id}
|
key={member.id}
|
||||||
size={28}
|
size={28}
|
||||||
|
zIndex={members.length - idx}
|
||||||
member={member}
|
member={member}
|
||||||
onMemberProfile={$target => {
|
onMemberProfile={$target => {
|
||||||
if (onCardMemberClick) {
|
if (onCardMemberClick) {
|
||||||
|
@ -18,12 +18,10 @@ export const OwnerIcon = styled(Crown)`
|
|||||||
|
|
||||||
const TaskDetailAssignee = styled.div`
|
const TaskDetailAssignee = styled.div`
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
margin: 0 0 0 -2px;
|
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
position: relative;
|
position: relative;
|
||||||
float: left;
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const Wrapper = styled.div<{ size: number | string; bgColor: string | null; backgroundURL: string | null }>`
|
export const Wrapper = styled.div<{ size: number | string; bgColor: string | null; backgroundURL: string | null }>`
|
||||||
|
@ -8,6 +8,8 @@ import TaskAssignee from 'shared/components/TaskAssignee';
|
|||||||
export const ProjectMember = styled(TaskAssignee)<{ zIndex: number }>`
|
export const ProjectMember = styled(TaskAssignee)<{ zIndex: number }>`
|
||||||
z-index: ${props => props.zIndex};
|
z-index: ${props => props.zIndex};
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
|
box-shadow: 0 0 0 2px rgba(16, 22, 58), inset 0 0 0 1px rgba(16, 22, 58, 0.07);
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const NavbarWrapper = styled.div`
|
export const NavbarWrapper = styled.div`
|
||||||
|
Loading…
Reference in New Issue
Block a user