diff --git a/package.json b/package.json index 426f839..e1a2004 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@pistonite/celera", - "version": "0.3.2", + "version": "0.3.3", "type": "module", "private": true, "description": "In-house UI framework", diff --git a/src/components/resize_layout.tsx b/src/components/resize_layout.tsx index 46322a2..1b9973d 100644 --- a/src/components/resize_layout.tsx +++ b/src/components/resize_layout.tsx @@ -57,6 +57,12 @@ export interface ResizeLayoutOwnProps { * if the device is mobile */ touch?: boolean; + + /** + * Override the z-index of the resize handles. Use if need to win z-index fights. + * Default z-index is 1000 + */ + resizeHandleZIndex?: number; } /** @@ -115,8 +121,10 @@ export const ResizeLayout: React.FC> = (inP secondMinHeight, children, touch: propTouch, + resizeHandleZIndex: propResizeHandleZIndex, ...props } = inProps; + const [firstChild, secondChild] = Children.toArray(children); const styles = useStyles(); @@ -124,6 +132,7 @@ export const ResizeLayout: React.FC> = (inP const firstRef = useRef(null); // [startX, startY, startWidth, startHeight] const [resizing, setResizing] = useState(undefined); + const resizeHandleZIndex = resizing ? undefined : (propResizeHandleZIndex ?? 1000); const touch = propTouch || isMobile(); @@ -207,6 +216,7 @@ export const ResizeLayout: React.FC> = (inP {firstChild} {!disabled && (
> = (inP > {!disabled && (