From 959184386922cd09024ade05c3cf8e0356f1c7f1 Mon Sep 17 00:00:00 2001 From: Siddharth Kshetrapal Date: Wed, 18 May 2022 12:15:33 +0200 Subject: [PATCH] ActionMenu: adjust width based on padding (#2080) * adjust width based on padding * update snapshost --- src/ActionList/Item.tsx | 2 +- src/NavList/__snapshots__/NavList.test.tsx.snap | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/ActionList/Item.tsx b/src/ActionList/Item.tsx index f3bfa12a540..599e1c42151 100644 --- a/src/ActionList/Item.tsx +++ b/src/ActionList/Item.tsx @@ -162,7 +162,7 @@ export const Item = React.forwardRef( appearance: 'none', background: 'unset', border: 'unset', - width: '100%', + width: 'calc(100% - 16px)', fontFamily: 'unset', textAlign: 'unset', marginY: 'unset', diff --git a/src/NavList/__snapshots__/NavList.test.tsx.snap b/src/NavList/__snapshots__/NavList.test.tsx.snap index 1b9ef3098c1..f5c83598518 100644 --- a/src/NavList/__snapshots__/NavList.test.tsx.snap +++ b/src/NavList/__snapshots__/NavList.test.tsx.snap @@ -55,7 +55,7 @@ exports[`NavList renders a simple list 1`] = ` appearance: none; background: unset; border: unset; - width: 100%; + width: calc(100% - 16px); font-family: unset; text-align: unset; margin-top: unset; @@ -139,7 +139,7 @@ exports[`NavList renders a simple list 1`] = ` appearance: none; background: unset; border: unset; - width: 100%; + width: calc(100% - 16px); font-family: unset; text-align: unset; margin-top: unset; @@ -456,7 +456,7 @@ exports[`NavList renders with groups 1`] = ` appearance: none; background: unset; border: unset; - width: 100%; + width: calc(100% - 16px); font-family: unset; text-align: unset; margin-top: unset; @@ -540,7 +540,7 @@ exports[`NavList renders with groups 1`] = ` appearance: none; background: unset; border: unset; - width: 100%; + width: calc(100% - 16px); font-family: unset; text-align: unset; margin-top: unset; @@ -888,7 +888,7 @@ exports[`NavList.Item with NavList.SubNav does not have active styles if SubNav appearance: none; background: unset; border: unset; - width: 100%; + width: calc(100% - 16px); font-family: unset; text-align: unset; margin-top: unset; @@ -1008,7 +1008,7 @@ exports[`NavList.Item with NavList.SubNav does not have active styles if SubNav appearance: none; background: unset; border: unset; - width: 100%; + width: calc(100% - 16px); font-family: unset; text-align: unset; margin-top: unset; @@ -1390,7 +1390,7 @@ exports[`NavList.Item with NavList.SubNav has active styles if SubNav contains t appearance: none; background: unset; border: unset; - width: 100%; + width: calc(100% - 16px); font-family: unset; text-align: unset; margin-top: unset;