forked from github/plane
chore: labels list file and function rename
This commit is contained in:
parent
1fe1596f9d
commit
c6d54a0ad2
@ -20,7 +20,7 @@ import issuesServices from "services/issues.service";
|
||||
import type { IIssueLabels } from "types";
|
||||
// fetch-keys
|
||||
import { PROJECT_ISSUE_LABELS } from "constants/fetch-keys";
|
||||
import { IssueLabelList } from "components/ui";
|
||||
import { IssueLabelsList } from "components/ui";
|
||||
|
||||
type Props = {
|
||||
setIsOpen: React.Dispatch<React.SetStateAction<boolean>>;
|
||||
@ -71,7 +71,7 @@ export const IssueLabelSelect: React.FC<Props> = ({ setIsOpen, value, onChange,
|
||||
>
|
||||
{value && value.length > 0 ? (
|
||||
<span className="flex items-center justify-center text-xs gap-2 px-3 py-1">
|
||||
<IssueLabelList
|
||||
<IssueLabelsList
|
||||
labels={value.map((v) => issueLabels?.find((l) => l.id === v)?.color) ?? []}
|
||||
length={3}
|
||||
showLength
|
||||
|
@ -15,4 +15,4 @@ export * from "./progress-bar";
|
||||
export * from "./select";
|
||||
export * from "./spinner";
|
||||
export * from "./tooltip";
|
||||
export * from "./label-list";
|
||||
export * from "./labels-list";
|
||||
|
@ -1,12 +1,12 @@
|
||||
import React from "react";
|
||||
|
||||
type IssueLabelListProps = {
|
||||
type IssueLabelsListProps = {
|
||||
labels?: (string | undefined)[];
|
||||
length?: number;
|
||||
showLength?: boolean;
|
||||
};
|
||||
|
||||
export const IssueLabelList: React.FC<IssueLabelListProps> = ({
|
||||
export const IssueLabelsList: React.FC<IssueLabelsListProps> = ({
|
||||
labels,
|
||||
length = 5,
|
||||
showLength = true,
|
Loading…
Reference in New Issue
Block a user