Skip to content

Commit

Permalink
Components:update re-resizable library
Browse files Browse the repository at this point in the history
  • Loading branch information
t-hamano committed Sep 25, 2024
1 parent b681b50 commit 80cbb17
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 33 deletions.
49 changes: 17 additions & 32 deletions package-lock.json

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

4 changes: 4 additions & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@

- `MenuGroup`: Simplify the MenuGroup styles within dropdown menus. ([#65561](https://github.com/WordPress/gutenberg/pull/65561)).

### Internal

- Update `re-resizable` dependency to 6.10.0 ([#65637](https://github.com/WordPress/gutenberg/pull/65637)).

## 28.8.0 (2024-09-19)

### Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"is-plain-object": "^5.0.0",
"memize": "^2.1.0",
"path-to-regexp": "^6.2.1",
"re-resizable": "^6.4.0",
"re-resizable": "^6.10.0",
"react-colorful": "^5.3.1",
"remove-accents": "^0.5.0",
"uuid": "^9.0.1"
Expand Down
13 changes: 13 additions & 0 deletions packages/components/src/resizable-box/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,17 @@ const HANDLE_STYLES = {
bottomLeft: HANDLE_STYLES_OVERRIDES,
};

const DEFAULT_ENABLE = {
top: false,
right: false,
bottom: false,
left: false,
topRight: false,
bottomRight: false,
bottomLeft: false,
topLeft: false,
};

type ResizableBoxProps = ResizableProps & {
children: ReactNode;
showHandle?: boolean;
Expand All @@ -101,6 +112,7 @@ function UnforwardedResizableBox(
showHandle = true,
__experimentalShowTooltip: showTooltip = false,
__experimentalTooltipProps: tooltipProps = {},
enable,
...props
}: ResizableBoxProps,
ref: ForwardedRef< Resizable >
Expand All @@ -115,6 +127,7 @@ function UnforwardedResizableBox(
handleClasses={ HANDLE_CLASSES }
handleStyles={ HANDLE_STYLES }
ref={ ref }
enable={ { ...DEFAULT_ENABLE, ...enable } }
{ ...props }
>
{ children }
Expand Down

0 comments on commit 80cbb17

Please sign in to comment.