Skip to content

Commit

Permalink
refactor: update SuiteSelectorSuiteLink with a and href to handle rig…
Browse files Browse the repository at this point in the history
…ht-click (#472)
  • Loading branch information
nastyastavitskaya authored Oct 24, 2024
1 parent 63b5a56 commit a81adc0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ export function SuiteSelectorSuiteLink(props: ISuiteSelectorSuiteLinkProps) {

return (
<>
<div onClick={handleContainerClick} className={getLinkClass(props.link)}>
<a href={props.link.href} onClick={handleContainerClick} className={getLinkClass(props.link)}>
<Flex vertical align="center" gap="small">
<NavigationIcon icon={renderLogo(elementIconMap[props.link.linkId])} label="" hideLabel />
{elementNameMap[props.link.linkId]}
</Flex>
</div>
</a>
</>
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
}

.suiteSelector__link {
display: block;
padding: var(--padding-sm) 0;
border-radius: var(--border-radius-lg);
color: var(--color-text-base);
Expand All @@ -15,6 +16,7 @@
.suiteSelector__link:not(.suiteSelector__link--active, .suiteSelector__link--disabled):hover {
background-color: var(--color-primary-bg-hover);
border-color: var(--color-primary-bg-hover);
color: var(--color-text-base);
}

.suiteSelector__link:not(.suiteSelector__link--active, .suiteSelector__link--disabled):hover .suiteSelector__suiteLogo {
Expand All @@ -23,9 +25,11 @@

.suiteSelector__link.suiteSelector__link--active {
border-color: var(--color-border);
color: var(--color-text-base);
}

.suiteSelector__link.suiteSelector__link--disabled {
pointer-events: none;
cursor: default;
color: var(--color-text-disabled);
}
Expand Down

0 comments on commit a81adc0

Please sign in to comment.