Skip to content

Commit

Permalink
fix(handle): fix typo in fix for #175
Browse files Browse the repository at this point in the history
Fixes #175
  • Loading branch information
STRML committed Jun 15, 2021
1 parent 564114d commit 670aced
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions examples/ExampleLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@ import 'style-loader!css-loader!../css/styles.css';
import 'style-loader!css-loader!./example.css';

const CustomResizeHandle = React.forwardRef((props, ref) => {
const {handleAxis, ...restProps} = props;
return (
<div
className="custom-handle custom-handle-se custom-resize-handle-component"
className={`custom-handle custom-handle-${handleAxis} custom-resize-handle-component`}
ref={ref}
{...props}
{...restProps}
></div>
)
})
);
});

export default class ExampleLayout extends React.Component<{}, {width: number, height: number}> {
state = {
Expand Down
2 changes: 1 addition & 1 deletion lib/Resizable.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ export default class Resizable extends React.Component<Props, void> {
return handle(handleAxis, ref);
}
// Handle is a React component (composite or DOM).
const isDOMElement = handle.type === 'string';
const isDOMElement = typeof handle.type === 'string';
const props = {
ref,
// Add `handleAxis` prop iff this is not a DOM element,
Expand Down

0 comments on commit 670aced

Please sign in to comment.