import React from "react"; import { CommandItem } from "cmdk"; type TagItemCreateProps = { inputValue: string; options: string[]; onSelect: () => void; }; const TagItemCreate = ({ inputValue, options, onSelect, }: TagItemCreateProps) => { const hasNoOption = !options .map((value) => value.toLowerCase()) .includes(inputValue.toLowerCase()); const render = inputValue !== "" && hasNoOption; if (!render) return null; return ( Create new tag: "{inputValue.trim()}" ); }; export default TagItemCreate;