You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the problem
With Label component, if you were to use render prop because you're using React Router or TanStack Router, it becomes an issue when it comes to links as the Label component doesn't have an easy way to indicate that you are providing a link through the render class
Ideally I do not want to add the class name myself within the render function as it is sort of out of scope for React/TanStack routes that just provide a different component.
How do you reproduce the problem?
Provide steps to reproduce. A codesandbox demonstrating the problem is appreciated.
Expected behavior
With <Label> it currently has this in the v6 code:
It would be nice if there was a isClickable component prop boolean or otherwise provided data through the render prop to allow you to indicate this.
Is this issue blocking you?
Not blocking. Workaround is to add something to the Label.href prop to indicate it is clickable as it can be ignored in the render prop (but still giving the class).
href={props.link ? "#" : undefined}
Screenshots
Image showcasing how Route labels look with a render prop. There is no change to color on hover.
Image showcasing the workaround described above. This workaround makes it work as expected with correct hover color.
The text was updated successfully, but these errors were encountered:
Describe the problem
With Label component, if you were to use
render
prop because you're using React Router or TanStack Router, it becomes an issue when it comes to links as the Label component doesn't have an easy way to indicate that you are providing a link through the render classIdeally I do not want to add the class name myself within the render function as it is sort of out of scope for React/TanStack routes that just provide a different component.
How do you reproduce the problem?
Provide steps to reproduce. A codesandbox demonstrating the problem is appreciated.
Expected behavior
With
<Label>
it currently has this in the v6 code:It would be nice if there was a isClickable component prop boolean or otherwise provided data through the render prop to allow you to indicate this.
Is this issue blocking you?
Not blocking. Workaround is to add something to the Label.href prop to indicate it is clickable as it can be ignored in the render prop (but still giving the class).
Screenshots
Image showcasing how Route labels look with a render prop. There is no change to color on hover.
Image showcasing the workaround described above. This workaround makes it work as expected with correct hover color.
The text was updated successfully, but these errors were encountered: