import { FilterListDropArea } from './FilterListDropArea'; import React from 'react'; import { Stack, Switch, Inline, Container, Text } from '@sanity/ui'; interface Props { items?: Array<{ isActive: boolean; value: string }>; onItemClick: (value: string) => void; onItemDrop?: (value: string) => void; } export const FilterList = ({ items = [], onItemClick, onItemDrop }: Props) => ( {items.map(({ isActive, value }) => { const inner = ( onItemClick(value)} style={{ marginRight: 8 }} /> ); const preventDrop = value === 'used' || value === 'unused'; return ( {onItemDrop && !preventDrop ? ( onItemDrop(value)}> {inner} ) : ( inner )} ); })} );