Skip to content

Commit

Permalink
chore(menu): removes duplicate use of menu context in items (#1831)
Browse files Browse the repository at this point in the history
  • Loading branch information
geotrev authored Jun 3, 2024
1 parent 79e6d46 commit 1ba4e11
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/dropdowns.next/src/elements/menu/Item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const ItemComponent = forwardRef<HTMLLIElement, IItemProps>(
ref
) => {
const { type: selectionType } = useItemGroupContext();
const { focusedValue, getItemProps } = useMenuContext();
const { focusedValue, getItemProps, isCompact } = useMenuContext();
const item = {
...toItem({
value,
Expand All @@ -60,7 +60,6 @@ const ItemComponent = forwardRef<HTMLLIElement, IItemProps>(
}) as LiHTMLAttributes<HTMLLIElement> & { ref: MutableRefObject<HTMLLIElement> };

const isActive = value === focusedValue;
const { isCompact } = useMenuContext();

const renderActionIcon = (iconType?: ItemType) => {
switch (iconType) {
Expand Down

0 comments on commit 1ba4e11

Please sign in to comment.