Closed mmailaender closed 10 months ago
Any news on this? @blvdmitry
I've checked the problem a bit more - <Tabs.Item>
renders a div
=> button
=> <span>
=> <div>
, and the latest <div>
is not filling the <Tabs.Item
in height, so obviously I can't expand my link component more than the parent div
<span class="Tabs_buttonContent__ezZEx"> // <Tabs.Item>
<div class=" Text_root__SNugT Text_--variant-body-3__GmJp2"> // <Tabs.Item>
<a href="/" class="w-full h-full">Very long item 1</a> // my code
</div> // <Tabs.Item>
</span> // <Tabs.Item>
Alternatively, you could provide a href
prop for the <Tabs.Item>
component - only not sure how to cover the <Link>
specific behaviors.
Looking at this issue for 2.3. Working with href still needs a Link wrapper to I'll look in ref forwarding and correct styles
Also in case it's blocking right now, it should be possible to call next router methods inside the onChange handler
Thx for the hint - We have decided already two months ago to go with a custom tabs components. So we are not blocked, but I would like to eliminate this workaround 🙂
Got it working, was a fun challenge for sure, going to release a patch this week
https://github.com/formaat-design/reshaped/assets/887379/424f56b0-0943-4758-a0b3-c125196f94db
<Tabs defaultValue="1">
<Tabs.List>
<NextLink href="#hey" passHref legacyBehavior>
<Tabs.Item value="1">Hey</Tabs.Item>
</NextLink>
<NextLink href="#hello" passHref legacyBehavior>
<Tabs.Item value="2">Hello</Tabs.Item>
</NextLink>
</Tabs.List>
</Tabs>
We're using the nextjs link component inside of
Tabs.Item
and this is leading to some weird click-zone problemIf we're wrapping![image](https://github.com/formaat-design/reshaped/assets/87228994/c51e249e-aa19-4abf-a554-f3b281fbf441)
Tabs.Item
intoLink
then the active marker (underline) stops working