fixed toolbar animation

This commit is contained in:
paul
2024-09-26 13:47:05 +05:30
parent e34751c20c
commit 8c45f896f0
7 changed files with 28 additions and 13 deletions

View File

@@ -29,7 +29,7 @@ export function SidebarWidgetCard({ name, img, url, license, widgetClass, innerR
<DraggableWrapper data-container={"sidebar"}
dragElementType={widgetClass.widgetType}
dragWidgetClass={widgetClass}
className="tw-cursor-pointer tw-w-fit tw-h-fit">
className="tw-cursor-pointer tw-w-fit tw-bg-white tw-h-fit">
<div ref={innerRef} className="tw-select-none tw-h-[200px] tw-w-[230px] tw-flex tw-flex-col
tw-rounded-md tw-overflow-hidden

View File

@@ -18,6 +18,8 @@ const DroppableWrapper = memo(({onDrop, droppableTags={}, ...props}) => {
const handleDragEnter = (e) => {
console.log("Drag enter")
if (!draggedElement || !draggedElement.getAttribute("data-drag-start-within")){
// if the drag is starting from outside (eg: file drop) or if drag doesn't exist
return

View File

@@ -18,7 +18,9 @@ export const ButtonModal = ({ message, title, okText="OK", onOk, onCancel, okBut
setIsModalOpen(true)
}
const handleOk = () => {
const handleOk = (e) => {
e.stopPropagation()
setIsModalOpen(false)
if (onOk){
onOk()