-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DS-510 Simplify the LinkBase implementation #200
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for echoes-react ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
LinkBaseProps, | ||
'download' | 'hasExternalIcon' | 'isMatchingFullPath' | 'shouldOpenInNewTab' | 'to' | ||
> & { hasExternalIcon?: boolean } & Pick< | ||
DropdownMenuItemNavLinkProps, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NP: I would have expected to see DropdownMenuItemNavLinkProps
defined before it is used - maybe move the type(s) up?
{...restAndRadixProps} | ||
onClick={handleClick} | ||
ref={ref} | ||
style={style} | ||
to={to}> | ||
{children} | ||
</RouterLinkComponent> | ||
|
||
{shouldOpenInNewTabProps && ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NP: this would look better IMO as {shouldOpenInNewTab && (
to={to}> | ||
{children} | ||
|
||
{shouldOpenInNewTabProps && ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NP: this would look better IMO as {shouldOpenInNewTab && (
I suggest we change linkbase to a simpler implementation where we extract the navlink part that is just for the DropdownMenuItemLink. It also allows to fully rely on the
shouldOpenInNewTab
props to display the external icon or not.