Skip to content

Commit

Permalink
addresses last bit of PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
mperrotti committed Jul 5, 2024
1 parent 38c6643 commit 2c2f814
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 27 deletions.
3 changes: 2 additions & 1 deletion packages/react/src/ActionList/Item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,8 @@ export const Item = React.forwardRef<HTMLLIElement, ActionListItemProps>(
}}
>
{childrenWithoutSlots}
{/* Loading message needs to be in here so it is read with the label */}
{loading === true && <VisuallyHidden>Loading</VisuallyHidden>}
</Box>
{slots.inlineDescription}
</ConditionalWrapper>
Expand Down Expand Up @@ -429,7 +431,6 @@ export const Item = React.forwardRef<HTMLLIElement, ActionListItemProps>(
</Box>
</ItemWrapper>
{!inactive && !loading && !menuContext && Boolean(slots.trailingAction) && slots.trailingAction}
{loading === true && <VisuallyHidden>Loading</VisuallyHidden>}
</LiBox>
</ItemContext.Provider>
)
Expand Down
25 changes: 0 additions & 25 deletions packages/react/src/NavList/NavList.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -225,31 +225,6 @@ export const WithInactiveItems: StoryFn = () => (
</PageLayout>
)

export const WithLoadingItems: StoryFn = () => (
<PageLayout>
<PageLayout.Pane position="start">
<NavList>
<NavList.Item href="#" loading>
Item 1
</NavList.Item>
<NavList.Item>
Item 2
<NavList.SubNav>
<NavList.Item href="#" aria-current="page">
Sub item 1
</NavList.Item>
<NavList.Item href="#" loading>
Sub item 2
</NavList.Item>
</NavList.SubNav>
</NavList.Item>
<NavList.Item href="#">Item 3</NavList.Item>
</NavList>
</PageLayout.Pane>
<PageLayout.Content></PageLayout.Content>
</PageLayout>
)

export const WithGroup: StoryFn = () => (
<PageLayout>
<PageLayout.Pane position="start">
Expand Down
1 change: 0 additions & 1 deletion packages/react/src/NavList/NavList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ export type NavListItemProps = {
href?: string
'aria-current'?: 'page' | 'step' | 'location' | 'date' | 'time' | 'true' | 'false' | boolean
inactiveText?: string
loading?: boolean
} & SxProp

const Item = React.forwardRef<HTMLAnchorElement, NavListItemProps>(
Expand Down

0 comments on commit 2c2f814

Please sign in to comment.