From be889fbf31b8f83e344d8aa375e9b480b4900fb0 Mon Sep 17 00:00:00 2001 From: yarema184 Date: Mon, 19 Feb 2024 09:00:26 +0200 Subject: [PATCH] feat: MDS-1000 add role prop for Popover.Trigger --- workspaces/core/src/popover/Popover.tsx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/workspaces/core/src/popover/Popover.tsx b/workspaces/core/src/popover/Popover.tsx index 14d5a16eb..595dd951b 100644 --- a/workspaces/core/src/popover/Popover.tsx +++ b/workspaces/core/src/popover/Popover.tsx @@ -77,13 +77,20 @@ const PopoverRoot = ({ ); }; -const Trigger = ({ children, ...rest }: { children?: React.ReactNode }) => { +const Trigger = ({ + children, + role = 'button', + ...rest +}: { + children?: React.ReactNode; + role?: string; +}) => { const { popper } = usePopoverContext('Popover.Trigger'); return ( {children}