Fix callouts

This commit is contained in:
Gustavo Lelis authored and James A. Petts committed 2020-05-15 13:47:15 +02:00
1 parent 0a5009f80b
commit 4668fbfa27
1 file changed
+5 -4
@@ -13,18 +13,19 @@ const baseStyle = {
width: `${expandedWidth}px`, width: `${expandedWidth}px`,
}; };
const collapsedHideWidth = expandedWidth - collapsedWidth - borderSize;
const styleMap = { const styleMap = {
open: { open: {
left: { marginLeft: '0px' }, left: { marginLeft: '0px' },
right: { marginRight: '0px' }, right: { marginRight: '0px' },
}, },
closed: { closed: {
left: { marginLeft: `-${expandedWidth - collapsedWidth - borderSize}px` }, left: { marginLeft: `-${collapsedHideWidth}px` },
right: { marginRight: `-${expandedWidth - collapsedWidth - borderSize}px` }, right: { marginRight: `-${collapsedHideWidth}px` },
}, },
}; };
const baseClassName = const baseClasses =
'transition-all duration-300 ease-in-out h-100 bg-primary-dark border-black flex flex-col justify-start'; 'transition-all duration-300 ease-in-out h-100 bg-primary-dark border-black flex flex-col justify-start';
const classesMap = { const classesMap = {
@@ -103,7 +104,7 @@ const SidePanel = ({
<div <div
className={classnames( className={classnames(
className, className,
baseClassName, baseClasses,
classesMap[openStatus][side] classesMap[openStatus][side]
)} )}
style={style} style={style}