Refactor tooltip ListItem for flexibility in to/href prop names #42
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
tooltip/ListItem
andtooltip/TooltipLinkList
currently make a lot of assumptions about the prop name that contains the "href" for a link. This is fine for standard links which always use an href, but it complicates things when you also pass in aLinkWrapper
. Gatsby links use theto
prop whereas Next links use thehref
prop, so the code that we had:... is making too many assumptions about what every single
LinkWrapper
expects. I propose we leave those assumptions out and instead just pass the props down to theLinkWrapper
so that this component can be more flexible. This means that whenever you use theListItem
, you have to be careful about what props you pass down, however that's the same concern you will have when you are mixing Next links and anchor tags anyway.