forked from github/plane
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>
28 lines
620 B
TypeScript
28 lines
620 B
TypeScript
import { Component } from "lucide-react";
|
|
|
|
interface ILabelName {
|
|
name: string;
|
|
color: string;
|
|
isGroup: boolean;
|
|
}
|
|
|
|
export const LabelName = (props: ILabelName) => {
|
|
const { name, color, isGroup } = props;
|
|
|
|
return (
|
|
<div className="flex items-center gap-3">
|
|
{isGroup ? (
|
|
<Component className="h-3.5 w-3.5" color={color} />
|
|
) : (
|
|
<span
|
|
className="h-3.5 w-3.5 flex-shrink-0 rounded-full"
|
|
style={{
|
|
backgroundColor: color && color !== "" ? color : "#000",
|
|
}}
|
|
/>
|
|
)}
|
|
<h6 className="text-sm">{name}</h6>
|
|
</div>
|
|
);
|
|
};
|