Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Gmin2 committed May 24, 2024
1 parent a3b9654 commit e18dedd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 2 additions & 0 deletions packages/ui/components/DropdownMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ interface DropdownMenuProps {
items: DropdownMenuItem[]
side?: 'top' | 'right' | 'bottom' | 'left'
align?: 'start' | 'center' | 'end'
onSelect?: (options: string[]) => void
}

interface DropdownMenuItemComponentProps {
Expand All @@ -44,6 +45,7 @@ export const DropdownMenu: FunctionComponent<DropdownMenuProps> = ({
items,
side,
align,
onSelect
}) => {
return (
<RadixDropdownMenu.Root>
Expand Down
4 changes: 0 additions & 4 deletions packages/ui/components/VisualEditor/PropertyControls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,17 +117,13 @@ const PropertyControls: React.FC<PropertyControlsProps> = ({ onAdd, schemaPath,
<DropdownMenu
trigger={<button style={{ ...inputAndSelectStyle, whiteSpace: 'nowrap'}}>{selectedTypes}</button>}
items={typeOptions}
multiple
selectedOptions={selectedTypes}
onSelect={(options) => setSelectedTypes(options)}
/>

{selectedTypes.includes('array') && (
<DropdownMenu
trigger={<button style={{ ...inputAndSelectStyle, whiteSpace: 'nowrap'}}>{selectedItemTypes}</button>}
items={itemTypeOptions}
multiple
selectedOptions={selectedItemTypes}
onSelect={(options) => setSelectedItemTypes(options)}
/>
)}
Expand Down

0 comments on commit e18dedd

Please sign in to comment.