Skip to content

Commit

Permalink
Merge branch 'fer/1910' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
fernandolucchesi committed Sep 29, 2023
2 parents bde1b2b + c28cf7a commit 9d59d74
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
5 changes: 3 additions & 2 deletions web/components/src/Link/Link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ import { default as NextLink } from 'next/link'

const { outline } = Tokens

export const BaseLink = styled(NextLink)`
export const BaseLink = styled(NextLink)<{ $textDecoration?: string }>`
display: inline-flex;
align-items: center;
color: var(--slate-blue-95);
text-decoration: ${({ $textDecoration }) => $textDecoration || 'none'};
&[data-focus-visible-added]:focus {
${outlineTemplate(outline)}
}
Expand Down Expand Up @@ -144,9 +145,9 @@ export const Link = forwardRef<HTMLAnchorElement, LinkProps>(function Link(
style={
{
...style,
textDecoration: underline ? 'underline' : 'none',
} as CSSProperties
}
$textDecoration={underline ? 'underline' : 'none'}
{...rest}
>
{children} {type === 'externalUrl' ? <Icon data={external_link} size={16} /> : null}
Expand Down
1 change: 0 additions & 1 deletion web/pageComponents/shared/Hero/FiftyFiftyHero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import TitleText from '../portableText/TitleText'
import type { LinkData, HeroType } from '../../../types/types'
import { BackgroundContainer, Link, Text } from '@components'
import { getUrlFromAction } from '../../../common/helpers/getUrlFromAction'
import { Flags } from '../../../common/helpers/datasetHelpers'
import { getLocaleFromName } from '../../../lib/localization'

const StyledHero = styled(BackgroundContainer)`
Expand Down
4 changes: 3 additions & 1 deletion web/pageComponents/shared/siteMenu/MenuGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ export const MenuGroup = ({ topLevelItem, index }: MenuGroupType) => {
<SubMenuGroupList aria-label={groupItem.label || topLevelLink?.label} unstyled>
{groupItem.links?.map((link: MenuLinkData) => (
<StyledItem key={link.id}>
<StyledSubMenuGroupLink href={getLink(link)}>{link.label}</StyledSubMenuGroupLink>
<StyledSubMenuGroupLink underline={false} href={getLink(link)}>
{link.label}
</StyledSubMenuGroupLink>
</StyledItem>
))}
</SubMenuGroupList>
Expand Down
5 changes: 4 additions & 1 deletion web/pageComponents/shared/siteMenu/simple/SimpleSiteMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,10 @@ const SimpleSiteMenu = ({ data, ...rest }: MenuProps) => {
}
return (
<li key={item.id}>
<MenuLink href={(item.link && item.link.slug) || '/'}> {item.label} </MenuLink>
<MenuLink variant="contentLink" href={(item.link && item.link.slug) || '/'}>
{' '}
{item.label}{' '}
</MenuLink>
</li>
)
}
Expand Down
1 change: 1 addition & 0 deletions web/pageComponents/topicPages/Breadcrumbs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ export const Breadcrumbs = ({
<StyledNextLink href={item.slug} $bgColor={containerStyles.backgroundColor}>
{item.label}
</StyledNextLink>

</BreadcrumbsListItem>
)
})}
Expand Down

0 comments on commit 9d59d74

Please sign in to comment.