import React from "react"; import { slugify } from "./util"; import { Vocabulary, VocabularyType } from "./vocabulary"; export type VocabularyWidgetProps = { id?: string; label: string; value: T; onChange: (value: T) => void; choices: Vocabulary; }; export function VocabularyWidget({ id, label, value, onChange, choices, }: VocabularyWidgetProps) { id = id || slugify(label); return (
); }