import React, { FC } from 'react'; import { useSortable } from '@dnd-kit/sortable'; import { CSS } from '@dnd-kit/utilities'; import classNames from 'classnames'; import styles from './styles.module.scss'; interface SortableImageGridItemProps { id: number | string; disabled?: boolean; className?: string; } const SortableItem: FC = ({ children, id, disabled = false, className, }) => { const { attributes, listeners, setNodeRef, transform, transition } = useSortable({ id, disabled, }); const style = { transform: CSS.Transform.toString(transform), transition, }; return (
{children}
); }; export { SortableItem };