UNPKG

@premieroctet/next-admin

Version:

Next-Admin provides a customizable and turnkey admin dashboard for applications built with Next.js and powered by the Prisma ORM. It aims to simplify the development process by providing a turnkey admin system that can be easily integrated into your proje

32 lines (31 loc) 1.14 kB
import { jsxs } from "react/jsx-runtime"; import { useSortable } from "@dnd-kit/sortable"; import { CSS } from "@dnd-kit/utilities"; import external_react_default from "react"; import { TableRow } from "./radix/Table.mjs"; import { getClonableElement } from "../utils/react19-compat.mjs"; const SortableTableRow_SortableTableRow = ({ id, children, onClick, className, grabElement })=>{ const { attributes, listeners, setNodeRef, transform, transition, setActivatorNodeRef } = useSortable({ id }); const style = { transform: CSS.Transform.toString(transform), transition }; return /*#__PURE__*/ jsxs(TableRow, { ref: setNodeRef, style: style, ...attributes, onClick: onClick, className: className, children: [ grabElement && /*#__PURE__*/ external_react_default.cloneElement(getClonableElement(grabElement), { ref: setActivatorNodeRef, ...listeners }), children ] }); }; const SortableTableRow = SortableTableRow_SortableTableRow; export { SortableTableRow as default };