Skip to content

Commit

Permalink
ensure data-testid only gets added to trigger element
Browse files Browse the repository at this point in the history
  • Loading branch information
KitoC committed Aug 6, 2024
1 parent f4c5605 commit b04a02c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/components/ActionsMenu/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ export const ActionsMenuBody = ({
onTriggerFocus,
closeMenu,
closeOnClick = false,
"data-testid": dataTestId,
...props
}) => {
const id = useId();
Expand Down Expand Up @@ -285,7 +286,8 @@ export const ActionsMenuBody = ({
ref: triggerRef,
...props,
...children.props,
"data-state": actionMenu.open ? "open" : "closed"
"data-state": actionMenu.open ? "open" : "closed",
"data-testid": dataTestId
})
};

Expand Down

0 comments on commit b04a02c

Please sign in to comment.