diff --git a/packages/ketcher-macromolecules/src/components/LayoutModeButton/LayoutModeButton.tsx b/packages/ketcher-macromolecules/src/components/LayoutModeButton/LayoutModeButton.tsx index 143420756a..5aa522f413 100644 --- a/packages/ketcher-macromolecules/src/components/LayoutModeButton/LayoutModeButton.tsx +++ b/packages/ketcher-macromolecules/src/components/LayoutModeButton/LayoutModeButton.tsx @@ -55,6 +55,7 @@ export const LayoutModeButton = () => { testId="layout-mode" vertical={true} needOpenByMenuItemClick={true} + layoutModeButton={true} > ) => { const [open, setOpen] = useState(false); const { isActive } = useMenuContext(); @@ -98,7 +100,10 @@ const SubMenu = ({ onClick={hideCollapse} > - + {subComponents.map((component) => component)} diff --git a/packages/ketcher-macromolecules/src/components/menu/subMenu/styles.ts b/packages/ketcher-macromolecules/src/components/menu/subMenu/styles.ts index 8fc9cc0fe4..82b1f9d9ee 100644 --- a/packages/ketcher-macromolecules/src/components/menu/subMenu/styles.ts +++ b/packages/ketcher-macromolecules/src/components/menu/subMenu/styles.ts @@ -51,7 +51,8 @@ export const OptionsContainer = styled.div` display: flex; position: absolute; left: ${({ isVertical }) => (isVertical ? '-34px' : '5px')}; - top: ${({ isVertical }) => (isVertical ? '38px' : '0')}; + top: ${({ isVertical, islayoutModeButton }) => + isVertical && islayoutModeButton ? '24px' : isVertical ? '38px' : '0px'}; border-radius: 4px; flex-direction: ${({ isVertical }) => (isVertical ? 'column' : 'row')}; height: 100px; diff --git a/packages/ketcher-macromolecules/src/components/menu/subMenu/types.ts b/packages/ketcher-macromolecules/src/components/menu/subMenu/types.ts index a0e23595e7..0272f8966d 100644 --- a/packages/ketcher-macromolecules/src/components/menu/subMenu/types.ts +++ b/packages/ketcher-macromolecules/src/components/menu/subMenu/types.ts @@ -20,4 +20,5 @@ export interface IStyledDropdownIconProps { export type OptionsContainerProps = { isVertical?: boolean; + islayoutModeButton?: boolean; } & React.HTMLAttributes;