Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: elements overlapping the left/right panels & delete #5

Merged
merged 1 commit into from
Dec 27, 2023
Merged
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
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