Skip to content

Commit

Permalink
Revert "fix(ActionList): update to read from group context if selecti…
Browse files Browse the repository at this point in the history
…onVariant is defined (#3269)"

This reverts commit 21ec626.
  • Loading branch information
broccolinisoup committed Jun 12, 2023
1 parent 780602f commit 741c8a7
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/ActionList/Item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import {ActionListProps, ListContext} from './List'
import {Selection} from './Selection'
import {ActionListItemProps, getVariantStyles, ItemContext, TEXT_ROW_HEIGHT} from './shared'
import {LeadingVisual, TrailingVisual} from './Visuals'
import {GroupContext} from './Group'

const LiBox = styled.li<SxProp>(sx)

Expand All @@ -40,11 +39,8 @@ export const Item = React.forwardRef<HTMLLIElement, ActionListItemProps>(
})
const {variant: listVariant, showDividers, selectionVariant: listSelectionVariant} = React.useContext(ListContext)
const {container, afterSelect, selectionAttribute} = React.useContext(ActionListContainerContext)
const {selectionVariant: groupSelectionVariant} = React.useContext(GroupContext)

const selectionVariant: ActionListProps['selectionVariant'] = groupSelectionVariant
? groupSelectionVariant
: listSelectionVariant
const selectionVariant: ActionListProps['selectionVariant'] = listSelectionVariant

/** Infer item role based on the container */
let itemRole: ActionListItemProps['role']
Expand Down

0 comments on commit 741c8a7

Please sign in to comment.