Honestly, I expected that asChild would use the whole component as input while retaining style, but it just ignores the parent style. But this might be my misunderstanding on how this works.
I wanted to put next.js <Link> inside the <DropdownMenuItem> while retaining style, but this proved more difficult than expected
Tremor Raw Component Version
// Tremor Raw Dropdown Menu [v0.0.0]
Link to minimal reproduction
code below
Steps to reproduce
Write a simple menu
Error: React.Children.only expected to receive a single React element child.
What is expected?
Working component
What is actually happening?
Wrap whole body of DropdownMenuPrimitives.Item in
<></>
What browsers are you seeing the problem on?
No response
Any additional comments?
Honestly, I expected that asChild would use the whole component as input while retaining style, but it just ignores the parent style. But this might be my misunderstanding on how this works. I wanted to put next.js
<Link>
inside the<DropdownMenuItem>
while retaining style, but this proved more difficult than expected