Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/drag-overlay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ interface DragOverlayProps {
children: JSX.Element | ((activeDraggable: Draggable | null) => JSX.Element);
class?: string;
style?: JSX.CSSProperties;
mount?: HTMLElement;
}

const DragOverlay: Component<DragOverlayProps> = (props) => {
Expand Down Expand Up @@ -57,7 +58,7 @@ const DragOverlay: Component<DragOverlayProps> = (props) => {
};

return (
<Portal mount={document.body}>
<Portal mount={props.mount ?? document.body}>
<Show when={state.active.draggable}>
<div ref={node} class={props.class} style={style()}>
{typeof props.children === "function"
Expand All @@ -70,4 +71,3 @@ const DragOverlay: Component<DragOverlayProps> = (props) => {
};

export { DragOverlay };