Skip to content

Commit 8859b5b

Browse files
chore(vertical-menu): fix focus indicators
1 parent 11dd147 commit 8859b5b

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

src/components/vertical-menu/responsive-vertical-menu/responsive-vertical-menu-item/responsive-vertical-menu-item.component.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,9 @@ const BaseItem = forwardRef<HTMLElement, BaseItemProps>(
145145
let siblings;
146146
let siblingsAtDepth;
147147

148+
// If in responsive mode, do not toggle the menu
149+
if (responsiveDisplay) return;
150+
148151
switch (e.key) {
149152
case "Tab":
150153
siblingsAtDepth =

src/components/vertical-menu/responsive-vertical-menu/responsive-vertical-menu-item/responsive-vertical-menu-item.style.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export const StyledResponsiveMenuItem = styled.button<StyledResponsiveMenuItemPr
9696
css`
9797
cursor: default;
9898
justify-content: space-around;
99-
width: 88%;
99+
width: 80%;
100100
`}
101101
102102
&:hover {
@@ -196,15 +196,15 @@ export const StyledNestedMenu = styled.div<{
196196
responsive &&
197197
css`
198198
font-weight: 500;
199-
width: 84%;
199+
width: 70%;
200200
201201
${depth &&
202202
depth >= 1 &&
203203
css`
204204
font-weight: 400;
205205
margin-left: var(--spacing200);
206206
margin-right: var(--spacing200);
207-
width: 79%;
207+
width: 63%;
208208
`}
209209
`}
210210
}

src/components/vertical-menu/responsive-vertical-menu/responsive-vertical-menu.component.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ const BaseMenu = ({
202202
reduceMotion={reduceMotion}
203203
ref={menuRef}
204204
responsive
205-
top="40px"
205+
top={responsiveMode ? "48px" : "40px"}
206206
width={width}
207207
>
208208
{children}

src/components/vertical-menu/responsive-vertical-menu/responsive-vertical-menu.style.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ export const StyledButton = styled(Button)<StyledButtonProps>`
3636
-webkit-box-shadow: ${addFocusStyling(true)};
3737
box-shadow: ${addFocusStyling(true)};
3838
border: 1px solid black;
39-
4039
outline: transparent 3px solid;
4140
}
4241
`;
4342

4443
export const StyledCloseButton = styled(Button)`
4544
border-radius: 0;
45+
4646
[data-component="icon"] {
4747
color: var(--colorsUtilityYang100);
4848
}

0 commit comments

Comments
 (0)