chore: labels list file and function rename

This commit is contained in:
Anmol Singh Bhatia 2023-03-02 15:43:50 +05:30
parent 1fe1596f9d
commit c6d54a0ad2
3 changed files with 5 additions and 5 deletions

View File

@ -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

View File

@ -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";

View File

@ -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,