Skip to content

Commit

Permalink
fix: Update re-resizable dependency and fix stacking order issue (#374
Browse files Browse the repository at this point in the history
)
  • Loading branch information
felixhabib authored Nov 6, 2024
1 parent 8cc6f07 commit dbf3310
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 5 deletions.
7 changes: 7 additions & 0 deletions .changeset/green-bikes-doubt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'playroom': patch
---

Update `re-resizable` dependency.

Fix issue where resizable handles were stacked below the editor panel and could not be selected.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
"portfinder": "^1.0.32",
"prettier": "^2.8.1",
"prop-types": "^15.8.1",
"re-resizable": "^6.9.9",
"re-resizable": "^6.10.0",
"react-docgen-typescript": "^2.2.2",
"react-helmet": "^6.1.0",
"react-transition-group": "^4.4.5",
Expand Down
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions src/Playroom/Playroom.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,16 @@ export default ({ components, themes, widths, snippets }: PlayroomProps) => {
updateEditorSize({ isVerticalEditor, offsetWidth, offsetHeight });
}}
enable={resizableConfig(editorPosition)}
/*
* Ensures resizable handles are stacked above the `codeEditor` component.
* By default, handles are stacked below the editor as introduced in:
* https://github.com/bokuweb/re-resizable/pull/827
*/
handleStyles={
editorPosition === 'bottom'
? { top: { zIndex: 1 } }
: { left: { zIndex: 1 } }
}
>
{codeEditor}
</Resizable>
Expand Down

0 comments on commit dbf3310

Please sign in to comment.