diff --git a/apps/app/components/core/board-view/single-issue.tsx b/apps/app/components/core/board-view/single-issue.tsx index bd87dde6c..bab90c537 100644 --- a/apps/app/components/core/board-view/single-issue.tsx +++ b/apps/app/components/core/board-view/single-issue.tsx @@ -23,7 +23,7 @@ import { ViewAssigneeSelect, ViewDueDateSelect, ViewEstimateSelect, - ViewLabelSelect, + ViewIssueLabel, ViewPrioritySelect, ViewStateSelect, } from "components/issues"; @@ -365,13 +365,7 @@ export const SingleBoardIssue: React.FC = ({ /> )} {properties.labels && issue.labels.length > 0 && ( - + )} {properties.assignee && ( = ({ isNotAllowed={isNotAllowed} /> )} - {properties.labels && issue.labels.length > 0 && ( - - )} + {properties.labels && } {properties.assignee && ( = ({ )} {properties.labels && (
- +
)} diff --git a/apps/app/components/issues/index.ts b/apps/app/components/issues/index.ts index 0ac13c992..7e9bff175 100644 --- a/apps/app/components/issues/index.ts +++ b/apps/app/components/issues/index.ts @@ -13,3 +13,4 @@ export * from "./my-issues-list-item"; export * from "./parent-issues-list-modal"; export * from "./sidebar"; export * from "./sub-issues-list"; +export * from "./label"; diff --git a/apps/app/components/issues/label.tsx b/apps/app/components/issues/label.tsx new file mode 100644 index 000000000..f3a7be9dd --- /dev/null +++ b/apps/app/components/issues/label.tsx @@ -0,0 +1,55 @@ +import React from "react"; + +// components +import { Tooltip } from "components/ui"; +// types +import { IIssue } from "types"; + +type Props = { + issue: IIssue; + maxRender?: number; +}; + +export const ViewIssueLabel: React.FC = ({ issue, maxRender = 1 }) => ( + <> + {issue.label_details.length > 0 ? ( + issue.label_details.length <= maxRender ? ( + <> + {issue.label_details.map((label, index) => ( +
+ +
+ + {label.name} +
+
+
+ ))} + + ) : ( +
+ l.name).join(", ")} + > +
+ + {`${issue.label_details.length} Labels`} +
+
+
+ ) + ) : ( + "" + )} + +);