fix: task label margin issue with task title
This commit is contained in:
parent
227ce5966d
commit
f7c6ee470e
@ -147,6 +147,11 @@ export const ListCardLabelText = styled.span`
|
|||||||
line-height: 16px;
|
line-height: 16px;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
export const ListCardLabelsWrapper = styled.div`
|
||||||
|
overflow: auto;
|
||||||
|
position: relative;
|
||||||
|
`;
|
||||||
|
|
||||||
export const ListCardLabel = styled.span<{ variant: 'small' | 'large' }>`
|
export const ListCardLabel = styled.span<{ variant: 'small' | 'large' }>`
|
||||||
${props =>
|
${props =>
|
||||||
props.variant === 'small'
|
props.variant === 'small'
|
||||||
@ -178,9 +183,6 @@ export const ListCardLabel = styled.span<{ variant: 'small' | 'large' }>`
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
export const ListCardLabels = styled.div<{ toggleLabels: boolean; toggleDirection: 'expand' | 'shrink' }>`
|
export const ListCardLabels = styled.div<{ toggleLabels: boolean; toggleDirection: 'expand' | 'shrink' }>`
|
||||||
overflow: auto;
|
|
||||||
position: relative;
|
|
||||||
display: inline-flex;
|
|
||||||
&:hover {
|
&:hover {
|
||||||
opacity: 0.8;
|
opacity: 0.8;
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,7 @@ import {
|
|||||||
ListCardLabels,
|
ListCardLabels,
|
||||||
ListCardLabel,
|
ListCardLabel,
|
||||||
ListCardLabelText,
|
ListCardLabelText,
|
||||||
|
ListCardLabelsWrapper,
|
||||||
ListCardOperation,
|
ListCardOperation,
|
||||||
CardTitle,
|
CardTitle,
|
||||||
CardMembers,
|
CardMembers,
|
||||||
@ -158,6 +159,8 @@ const Card = React.forwardRef(
|
|||||||
</ListCardOperation>
|
</ListCardOperation>
|
||||||
)}
|
)}
|
||||||
<ListCardDetails complete={complete ?? false}>
|
<ListCardDetails complete={complete ?? false}>
|
||||||
|
{labels && labels.length !== 0 && (
|
||||||
|
<ListCardLabelsWrapper>
|
||||||
<ListCardLabels
|
<ListCardLabels
|
||||||
toggleLabels={toggleLabels}
|
toggleLabels={toggleLabels}
|
||||||
toggleDirection={toggleDirection}
|
toggleDirection={toggleDirection}
|
||||||
@ -168,8 +171,7 @@ const Card = React.forwardRef(
|
|||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{labels &&
|
{labels
|
||||||
labels
|
|
||||||
.slice()
|
.slice()
|
||||||
.sort((a, b) => a.labelColor.position - b.labelColor.position)
|
.sort((a, b) => a.labelColor.position - b.labelColor.position)
|
||||||
.map(label => (
|
.map(label => (
|
||||||
@ -187,6 +189,8 @@ const Card = React.forwardRef(
|
|||||||
</ListCardLabel>
|
</ListCardLabel>
|
||||||
))}
|
))}
|
||||||
</ListCardLabels>
|
</ListCardLabels>
|
||||||
|
</ListCardLabelsWrapper>
|
||||||
|
)}
|
||||||
{editable ? (
|
{editable ? (
|
||||||
<EditorContent>
|
<EditorContent>
|
||||||
{complete && <CompleteIcon width={16} height={16} />}
|
{complete && <CompleteIcon width={16} height={16} />}
|
||||||
|
Loading…
Reference in New Issue
Block a user