import { Group } from '@mantine/core'; import { useDragControls, Reorder } from 'framer-motion'; import { MdDragIndicator } from 'react-icons/md'; import { Checkbox } from '/@/renderer/components'; const DragHandle = ({ dragControls }: any) => { return ( dragControls.start(event)} /> ); }; interface SidebarItem { disabled: boolean; id: string; } export interface DraggableItemProps { handleChangeDisabled: (id: string, e: boolean) => void; item: SidebarItem; value: string; } export const DraggableItem = ({ item, value, handleChangeDisabled }: DraggableItemProps) => { const dragControls = useDragControls(); return ( handleChangeDisabled(item.id, e.target.checked)} /> {value} ); };