diff --git a/package.json b/package.json index ed2884298..5218a0e33 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "re-resizable", - "version": "6.5.0", + "version": "6.5.1", "description": "Resizable component for React.", "title": "re-resizable", "main": "./lib/index.es5.js", diff --git a/src/index.tsx b/src/index.tsx index a5b19fdc3..25fe2ad82 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -77,7 +77,7 @@ export type ResizeStartCallback = ( ) => void | boolean; export interface ResizableProps { - as: string | React.ComponentType; + as?: string | React.ComponentType; style?: React.CSSProperties; className?: string; grid?: [number, number]; @@ -914,7 +914,7 @@ export class Resizable extends React.PureComponent { style.flexBasis = this.state.flexBasis; } - const Wrapper = this.props.as; + const Wrapper = this.props.as ?? 'div'; return (