@@ -26,6 +26,7 @@ export type Props = {
26
26
className ?: ?string ,
27
27
width : number ,
28
28
height : number ,
29
+ handle : ReactElement < any > ,
29
30
handleSize : [ number , number ] ,
30
31
lockAspectRatio : boolean ,
31
32
axis : Axis ,
@@ -54,6 +55,9 @@ export default class Resizable extends React.Component<Props, State> {
54
55
// Optional props
55
56
//
56
57
58
+ // Custom resize handle
59
+ handle : PropTypes . element ,
60
+
57
61
// If you change this, be sure to update your css
58
62
handleSize : PropTypes . array ,
59
63
@@ -200,7 +204,7 @@ export default class Resizable extends React.Component<Props, State> {
200
204
201
205
render ( ) : ReactNode {
202
206
// eslint-disable-next-line no-unused-vars
203
- const { children, draggableOpts, width, height, handleSize,
207
+ const { children, draggableOpts, width, height, handle , handleSize,
204
208
lockAspectRatio, axis, minConstraints, maxConstraints, onResize,
205
209
onResizeStop, onResizeStart, ...p } = this . props ;
206
210
@@ -223,8 +227,8 @@ export default class Resizable extends React.Component<Props, State> {
223
227
onStop = { this . resizeHandler ( 'onResizeStop' ) }
224
228
onStart = { this . resizeHandler ( 'onResizeStart' ) }
225
229
onDrag = { this . resizeHandler ( 'onResize' ) }
226
- >
227
- < span className = "react-resizable-handle" />
230
+ >
231
+ { handle || < span className = "react-resizable-handle" /> }
228
232
</ DraggableCore >
229
233
]
230
234
} ) ;
0 commit comments