inertia icon indicating copy to clipboard operation
inertia copied to clipboard

Custom component for InertiaLink component

Open bobbypiper opened this issue 3 years ago • 1 comments

Discussed in https://github.com/inertiajs/inertia/discussions/998

Originally posted by ZeoKnight December 8, 2021 Can this line be removed from InertiaLink in React? With the as.toLowerCase() included, this blocks the ability to render as custom components (perhaps using a UI framework etc).

With the line removed I can easily do;

<InertiaLink as={Button} >Foo</InertiaLink>

Thoughts?

https://github.com/inertiajs/inertia/blob/7fcab0e8411e67d93942a4f44cf426670cc7939f/packages/inertia-react/src/Link.js#L75

bobbypiper avatar Feb 04 '22 11:02 bobbypiper

+1 not just react, but Vue can benefit from this. UI lib like Vuetify does not support InertiaLink atm maybe there should be a check if prop type is a component or string/HTMLElement if it a string, then lowercase it

ibnu-ja avatar May 02 '22 07:05 ibnu-ja

+1 add this feature, please

BuyOwnEx avatar Dec 29 '22 21:12 BuyOwnEx

Hey! Thanks so much for your interest in Inertia.js and for sharing this issue/suggestion.

In an attempt to get on top of the issues and pull requests on this project I am going through all the older issues and PRs and closing them, as there's a decent chance that they have since been resolved or are simply not relevant any longer. My hope is that with a "clean slate" me and the other project maintainers will be able to better keep on top of issues and PRs moving forward.

Of course there's a chance that this issue is still relevant, and if that's the case feel free to simply submit a new issue. The only thing I ask is that you please include a super minimal reproduction of the issue as a Git repo. This makes it much easier for us to reproduce things on our end and ultimately fix it.

Really not trying to be dismissive here, I just need to find a way to get this project back into a state that I am able to maintain it. Hope that makes sense! ❤️

reinink avatar Jul 28 '23 01:07 reinink