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