Skip to content

Commit 670aced

Browse files
committed
fix(handle): fix typo in fix for #175
Fixes #175
1 parent 564114d commit 670aced

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

examples/ExampleLayout.js

+5-4
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@ import 'style-loader!css-loader!../css/styles.css';
55
import 'style-loader!css-loader!./example.css';
66

77
const CustomResizeHandle = React.forwardRef((props, ref) => {
8+
const {handleAxis, ...restProps} = props;
89
return (
910
<div
10-
className="custom-handle custom-handle-se custom-resize-handle-component"
11+
className={`custom-handle custom-handle-${handleAxis} custom-resize-handle-component`}
1112
ref={ref}
12-
{...props}
13+
{...restProps}
1314
></div>
14-
)
15-
})
15+
);
16+
});
1617

1718
export default class ExampleLayout extends React.Component<{}, {width: number, height: number}> {
1819
state = {

lib/Resizable.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ export default class Resizable extends React.Component<Props, void> {
162162
return handle(handleAxis, ref);
163163
}
164164
// Handle is a React component (composite or DOM).
165-
const isDOMElement = handle.type === 'string';
165+
const isDOMElement = typeof handle.type === 'string';
166166
const props = {
167167
ref,
168168
// Add `handleAxis` prop iff this is not a DOM element,

0 commit comments

Comments
 (0)