import clsx from 'clsx'; import React from 'react'; export type KintonePluginSelectOptionData = { value: string; label: string; disabled?: boolean; }; export type KintonePluginSelectProps = { className?: string; value: string; onChange: (value: string) => void; options: KintonePluginSelectOptionData[]; }; const KintonePluginSelect: React.FC = (props) => { const { className, value, onChange, options } = props; const optionWithKeys = React.useMemo( () => options.map((option) => ({ ...option, key: crypto.randomUUID(), })), [options], ); if (options.length === 0) { return null; } const handleOnChange = (e: React.ChangeEvent) => { onChange(e.target.value); }; return (
); }; export default KintonePluginSelect;