@@ -26,6 +26,7 @@ export type Props = {
2626 className ?: ?string ,
2727 width : number ,
2828 height : number ,
29+ handle : ReactElement < any > ,
2930 handleSize : [ number , number ] ,
3031 lockAspectRatio : boolean ,
3132 axis : Axis ,
@@ -54,6 +55,9 @@ export default class Resizable extends React.Component<Props, State> {
5455 // Optional props
5556 //
5657
58+ // Custom resize handle
59+ handle : PropTypes . element ,
60+
5761 // If you change this, be sure to update your css
5862 handleSize : PropTypes . array ,
5963
@@ -200,7 +204,7 @@ export default class Resizable extends React.Component<Props, State> {
200204
201205 render ( ) : ReactNode {
202206 // eslint-disable-next-line no-unused-vars
203- const { children, draggableOpts, width, height, handleSize,
207+ const { children, draggableOpts, width, height, handle , handleSize,
204208 lockAspectRatio, axis, minConstraints, maxConstraints, onResize,
205209 onResizeStop, onResizeStart, ...p } = this . props ;
206210
@@ -223,8 +227,8 @@ export default class Resizable extends React.Component<Props, State> {
223227 onStop = { this . resizeHandler ( 'onResizeStop' ) }
224228 onStart = { this . resizeHandler ( 'onResizeStart' ) }
225229 onDrag = { this . resizeHandler ( 'onResize' ) }
226- >
227- < span className = "react-resizable-handle" />
230+ >
231+ { handle || < span className = "react-resizable-handle" /> }
228232 </ DraggableCore >
229233 ]
230234 } ) ;
0 commit comments