diff options
Diffstat (limited to 'server/sonar-web/design-system/src/components/Link.tsx')
-rw-r--r-- | server/sonar-web/design-system/src/components/Link.tsx | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/server/sonar-web/design-system/src/components/Link.tsx b/server/sonar-web/design-system/src/components/Link.tsx index edd9f192a40..d97489785d7 100644 --- a/server/sonar-web/design-system/src/components/Link.tsx +++ b/server/sonar-web/design-system/src/components/Link.tsx @@ -155,11 +155,14 @@ export const NakedLink = styled(BaseLink)` font-weight: 600; color: ${themeColor('linkNaked')}; - &:hover, - &:focus, - &:active { - color: ${themeColor('linkActive')}; - } + ${({ disabled, theme }) => + disabled + ? tw`sw-cursor-default` + : `&:hover, + &:focus, + &:active { + color: ${themeColor('linkActive')({ theme })}; + }`}; `; export const DrilldownLink = styled(StyledBaseLink)` @@ -219,6 +222,8 @@ export const DiscreetLinkBox = styled(StyledBaseLink)` background-color: none; display: block; } + + ${({ disabled }) => (disabled ? tw`sw-cursor-default` : '')}; `; LinkBox.displayName = 'DiscreetLinkBox'; |