mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
c9ffc9465f
* fix: Labels reordering inconsistency * fix: Delete child labels * feat: multi-select while grouping labels * refactor: label sorting in mobx computed function * feat: drag & drop label grouping, un-grouping * chore: removed label select modal * fix: moving labels from project store to project label store * fix: typo changes and build tree function added * labels feature * disable dropping group into a group * fix build errors * fix more issues * chore: added combining state UI, fixed scroll issue for label groups * chore: group icon for label groups * fix: group cannot be dropped in another group --------- Co-authored-by: sriram veeraghanta <veeraghanta.sriram@gmail.com> Co-authored-by: rahulramesha <rahulramesham@gmail.com> Co-authored-by: Aaryan Khandelwal <aaryankhandu123@gmail.com>
30 lines
843 B
TypeScript
30 lines
843 B
TypeScript
import { FC } from "react";
|
|
// ui
|
|
import { Tooltip } from "@plane/ui";
|
|
// types
|
|
import { IIssueLabel } from "types";
|
|
|
|
type IssueLabelsListProps = {
|
|
labels?: (IIssueLabel | undefined)[];
|
|
length?: number;
|
|
showLength?: boolean;
|
|
};
|
|
|
|
export const IssueLabelsList: FC<IssueLabelsListProps> = (props) => {
|
|
const { labels } = props;
|
|
return (
|
|
<>
|
|
{labels && (
|
|
<>
|
|
<Tooltip position="top" tooltipHeading="Labels" tooltipContent={labels.map((l) => l?.name).join(", ")}>
|
|
<div className="flex items-center gap-1 px-2 py-1 text-xs text-custom-text-200 rounded border-[0.5px] border-custom-border-300">
|
|
<span className="h-2 w-2 flex-shrink-0 rounded-full bg-custom-primary" />
|
|
{`${labels.length} Labels`}
|
|
</div>
|
|
</Tooltip>
|
|
</>
|
|
)}
|
|
</>
|
|
);
|
|
};
|