diff --git a/kotonebot-devtool/src/components/PropertyGrid.tsx b/kotonebot-devtool/src/components/PropertyGrid.tsx index a4c9ae5..f57fd94 100644 --- a/kotonebot-devtool/src/components/PropertyGrid.tsx +++ b/kotonebot-devtool/src/components/PropertyGrid.tsx @@ -5,6 +5,12 @@ export interface PropertyRenderBase { required?: boolean, } +type SelectOption = { + value: T, + options: Array<{ value: T, label: string }>, + onChange: (value: T) => void +} + interface PropertyRenderInputOptions { text: { value: string, @@ -17,7 +23,8 @@ interface PropertyRenderInputOptions { 'long-text': { value: string, onChange: (value: string) => void - } + }, + select: SelectOption } type RenderType = keyof PropertyRenderInputOptions; @@ -162,6 +169,21 @@ const PropertyGrid: React.FC = ({ properties, titleColumnWidt } else if (type === 'long-text') { const propertyLongText = property.render as PropertyRenderInputOptions['long-text']; field =