[bug]: Passing in a custom component into the popover component does not behave as expected #5827
Open
2 tasks done
Labels
bug
Something isn't working
Describe the bug
I've create a custom component
SidebarPopover
whose props includepopoverTrigger
of typeReact.ReactNode
. Component essentially looks like this:I've been attempting to pass in a custom component that I created,
SidebarButton
, into my customSidebarPopover
component through thepopoverTrigger
prop.SidebarButton
looks something like this:Passing in
SidebarButton
intoSidebarPopover
does not display the popover as expected. HOWEVER, if I directly pass in:into my custom
SidebarPopover
, the popover appears?!? I would expect that passing in the above, and theSidebarButton
component should yield the same behavior, but this is not the case.In both cases
Button
is the shadcn ui component andImage
is from Next.js' libraries.Affected component/components
Popover
How to reproduce
Codesandbox/StackBlitz link
https://codesandbox.io/p/github/carolinar7/react-practice/shadcn-bug-popover-bug-report
Logs
No response
System Info
Before submitting
The text was updated successfully, but these errors were encountered: