Resizable Horizontal Split View
Many modern applications, from IDEs to data dashboards, require flexible layouts where users can adjust the size of content areas. This problem challenges you to build a foundational component for such a layout: a horizontal split view with resizable panels. This is a common UI pattern that demonstrates your ability to manage DOM interactions, state, and responsive styling.
Your task is to implement a ResizablePanels React component that displays two child components side-by-side, separated by a draggable vertical divider.
ResizablePanels component: This component should accept two React elements as leftPanel and rightPanel props.leftPanel, a draggable divider, and the rightPanel horizontally. The panels should initially share the available width equally.leftPanel and rightPanel should adjust accordingly. The total width of the ResizablePanels container should remain constant.ResizablePanels component should occupy 100% width and height of its parent container.ew-resize to indicate it's draggable.ResizablePanels component renders with two distinct panels and a visible divider between them.ew-resize when hovering over the divider.Constraints
mousemove, mouseup, etc.) without relying on third-party resize libraries.ResizablePanels component will be rendered within a container that provides a defined width and height.100px or 10%) or passed as a prop.Loading editor...