Skip to main content

Draggable list

<DraggableList
items={value}
onChange={(value) => setValue(value)}
>
{(item) => {
const { toggle, title, icon, updateData } = item;

return (
<DraggableListItem
label={title ?? 'New item'}
icon={icon ?? icons.emptyCircle}
>
<Switch
aria-label='Title'
checked={toggle}
onChange={(value) => updateData({ toggle: value })}
/>
</DraggableListItem>
);
}}
</DraggableList>

For the complete list of props, use your IDE's autocomplete functionality.