Skip to content

Commit

Permalink
fix: elements overlapping the left/right panels & delete (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
vshakitskiy authored Dec 27, 2023
1 parent df0dc5a commit 4abca97
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apps/dashboard/src/components/OgPlayground.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ export function OgPlayground({ initialElements, width, height }: OgProviderProps
return
}

if (event.key === 'Backspace' && selectedElement) {
if ((event.key === 'Backspace' || event.key === 'Delete') && selectedElement) {
event.preventDefault()
removeElement(selectedElement)
}
Expand Down Expand Up @@ -245,7 +245,7 @@ export function OgPlayground({ initialElements, width, height }: OgProviderProps
return (
<OgContext.Provider value={value}>
<div className="w-screen h-screen flex flex-row justify-between items-center bg-gray-50">
<div className="w-[300px] h-screen flex flex-col border-r border-gray-100 shadow-lg shadow-gray-100 bg-white">
<div className="w-[300px] h-screen flex flex-col border-r border-gray-100 shadow-lg shadow-gray-100 bg-white z-10">
<LeftPanel />
</div>
<div className="flex flex-col items-center gap-4">
Expand All @@ -260,7 +260,7 @@ export function OgPlayground({ initialElements, width, height }: OgProviderProps
<div className="border border-gray-100 absolute pointer-events-none transform translate-y-[32px]" style={{ width, height }} />
<PlaygroundToolbar />
</div>
<div className="w-[300px] h-screen flex flex-col border-l border-gray-100 shadow-lg shadow-gray-100 bg-white">
<div className="w-[300px] h-screen flex flex-col border-l border-gray-100 shadow-lg shadow-gray-100 bg-white z-10">
<RightPanel />
</div>
</div>
Expand Down

0 comments on commit 4abca97

Please sign in to comment.