+ {isLoading ? (
+
{t("common.loading")}
+ ) : filteredOptions.length > 0 ? (
+ filteredOptions.map((option) => (
+
+ `nodedc-dropdown-option cursor-pointer ${
+ selected ? "text-primary" : "text-secondary"
+ }`
+ }
+ >
+ {({ selected }) => (
+ <>
+ {option.content}
+ {selected && (
+
+
+
+ )}
+ >
)}
- >
- )}
-
- ))
- ) : submitting ? (
-
- ) : canCreateLabel ? (
-
{
- e.preventDefault();
- e.stopPropagation();
- if (!query.length) return;
- handleAddLabel(query);
- }}
- className={`rounded-[0.9rem] px-2 py-2 text-left text-secondary ${query.length ? "cursor-pointer hover:bg-white/6" : "cursor-default"}`}
- >
- {query.length ? (
- <>
- + {t("label.create.type")} "{query}"
- >
+
+ ))
+ ) : submitting ? (
+
+ ) : canCreateLabel ? (
+
{
+ e.preventDefault();
+ e.stopPropagation();
+ if (!query.length) return;
+ handleAddLabel(query);
+ }}
+ className={`rounded-[0.9rem] px-2 py-2 text-left text-secondary ${query.length ? "cursor-pointer hover:bg-white/6" : "cursor-default"}`}
+ >
+ {query.length ? (
+ <>
+ + {t("label.create.type")} "{query}"
+ >
+ ) : (
+ t("label.create.type")
+ )}
+
) : (
- t("label.create.type")
+
+ {t("common.search.no_matching_results")}
+
)}
-
- ) : (
-
- {t("common.search.no_matching_results")}
-
- )}
-