import { useState } from "react"; import Select from "@moduletrace/twui/form/Select"; import Button from "@moduletrace/twui/layout/Button"; import Row from "@moduletrace/twui/layout/Row"; type Props = { id: string; /** * What's being picked, e.g. "bot". */ noun: string; options: { value: string; title: string }[]; loading?: boolean; onAdd: (params: { value: string }) => void; }; /** * A select of things to add, and an Add button beside it. */ export default function InlineAddSelect({ id, noun, options, loading, onAdd }: Props) { const [value, setValue] = useState(""); if (!options.length) return null; return (