Skip to content

Commit

Permalink
chore: update changeset; temporary override to polaris
Browse files Browse the repository at this point in the history
  • Loading branch information
zakwarsame committed Jul 20, 2023
1 parent 3d0c80d commit 629d08c
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .changeset/lemon-cars-stare.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'@shopify/polaris': major
'@shopify/polaris': minor
---

- Created a Menu Item with indentation that renders in the user menu
3 changes: 1 addition & 2 deletions polaris-react/src/components/ActionList/ActionList.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@
@include focus-ring($size: 'wide');
/* stylelint-disable-next-line polaris/conventions/polaris/custom-property-allowed-list -- se23 */
--pc-action-list-item-min-height: var(--p-space-8);
padding: var(--p-space-1_5-experimental);
// padding: var(--p-space-1_5-experimental) var(--p-space-2);
padding: var(--p-space-1_5-experimental) var(--p-space-2);
border-radius: var(--p-border-radius-2);
align-items: center;
display: flex;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ export const TruncateText = ({children}: {children: string}) => {
}
}, [children]);
const text = (
<Text as="span" variant="bodyMd" truncate>
<Text as="span" truncate>
<Box width="100%" ref={textRef}>
{children}
</Box>
Expand All @@ -191,7 +191,7 @@ export const TruncateText = ({children}: {children: string}) => {
content={children}
dismissOnMouseOut
>
<Text as="span" variant="bodyMd" truncate>
<Text as="span" truncate>
{children}
</Text>
</Tooltip>
Expand Down
12 changes: 6 additions & 6 deletions polaris-react/src/components/TopBar/components/Menu/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,7 @@ function generateMenuItem(

if (id === OTHER_STORES_ID) {
return {
itemMarkup: (
<Box width="100%" paddingInlineEnd="2" insetInlineEnd="2">
{itemMarkup}
</Box>
),
itemMarkup,
isOtherStore: true,
};
}
Expand All @@ -193,7 +189,11 @@ function buildSections(actions: ActionListProps['sections'], indent: boolean) {
? storeListSection?.items.map((item, index) => {
const {itemMarkup, isOtherStore} = generateMenuItem(item, index);
if (isOtherStore) {
otherStoresMarkup = itemMarkup;
otherStoresMarkup = (
<Box width="100%" paddingInlineEnd="2" insetInlineEnd="2">
{itemMarkup}
</Box>
);
return null;
}
return itemMarkup;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,5 @@ $item-vertical-padding: calc((var(--p-space-3)) / 2);
color: var(--p-color-text);
border-radius: var(--p-border-radius-2);
outline: var(--p-border-width-3) solid transparent;
font-weight: var(--p-font-weight-semibold);
}

0 comments on commit 629d08c

Please sign in to comment.