diff --git a/platform/ui/src/components/SidePanel/SidePanel.jsx b/platform/ui/src/components/SidePanel/SidePanel.jsx
index eebdcd703..a4faf4bd5 100644
--- a/platform/ui/src/components/SidePanel/SidePanel.jsx
+++ b/platform/ui/src/components/SidePanel/SidePanel.jsx
@@ -4,64 +4,107 @@ import classnames from 'classnames';
import { Button, Icon } from '@ohif/ui';
+const borderSize = 4;
+const expandedWidth = 320;
+const collapsedWidth = 60;
+
const baseStyle = {
- maxWidth: '320px',
+ maxWidth: `${expandedWidth}px`,
+ width: `${expandedWidth}px`,
};
-const dynamicStyle = {
+const styleMap = {
open: {
- left: {},
- right: {},
+ left: { marginLeft: '0px' },
+ right: { marginRight: '0px' },
},
closed: {
- left: {},
- right: {},
+ left: { marginLeft: `-${expandedWidth - collapsedWidth - borderSize}px` },
+ right: { marginRight: `-${expandedWidth - collapsedWidth - borderSize}px` },
},
};
-const sideClasses = {
- left: 'border-r-4',
- right: 'border-l-4',
-};
-
const baseClassName =
- 'transition-all duration-300 ease-in-out h-100 bg-primary-light border-black';
+ 'transition-all duration-300 ease-in-out h-100 bg-primary-dark border-black flex flex-col justify-start';
+
+const classesMap = {
+ open: {
+ left: `border-r-${borderSize}`,
+ right: `border-l-${borderSize}`,
+ },
+ closed: {
+ left: `border-r-${borderSize} items-end`,
+ right: `border-l-${borderSize} items-start`,
+ },
+};
const SidePanel = ({
side,
className,
children,
defaultIsOpen,
- componentName,
+ componentLabel,
+ iconLabel,
iconName,
}) => {
const [isOpen, setIsOpen] = useState(defaultIsOpen);
const openStatus = isOpen ? 'open' : 'closed';
- const style = Object.assign({}, dynamicStyle[openStatus][side]);
+ const style = Object.assign({}, styleMap[openStatus][side], baseStyle);
+ const openIconName = {
+ left: 'chevron-right',
+ right: 'chevron-right',
+ };
+
+ const sidePanelHeader = () => {
+ return (
+