mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-26 15:48:32 -06:00
advanced frontend also being managed by 2.0
This commit is contained in:
22
nextjs/src/components/DropTargetStyling.tsx
Normal file
22
nextjs/src/components/DropTargetStyling.tsx
Normal file
@@ -0,0 +1,22 @@
|
||||
import React, { ReactNode } from "react";
|
||||
import { useDraggingContext } from "../app/course/[courseName]/context/draggingContext";
|
||||
|
||||
export default function DropTargetStyling({
|
||||
children,
|
||||
draggingClassName,
|
||||
}: {
|
||||
children: ReactNode;
|
||||
draggingClassName: string;
|
||||
}) {
|
||||
const { isDragging } = useDraggingContext();
|
||||
return (
|
||||
<div
|
||||
className={
|
||||
"h-full transition-all duration-500 " +
|
||||
(isDragging ? draggingClassName : "")
|
||||
}
|
||||
>
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user