-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* 🎨 update * 🎨 update focus styling * 🎨 update * 🎨 update mobile * 🎨 update * 🎨 update styling * 🎨 update * 🎨 darker tint on divider
- Loading branch information
1 parent
a253446
commit d75976c
Showing
8 changed files
with
69 additions
and
173 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,19 @@ | ||
import { AnchorHTMLAttributes } from 'react' | ||
import { LogoSecondary } from '@components' | ||
import styled from 'styled-components' | ||
import { outlineTemplate, Tokens } from '@utils' | ||
import NextLink from 'next/link' | ||
|
||
const { outline } = Tokens | ||
|
||
const StyledLogoLink = styled(NextLink)<LogoLinkProps>` | ||
justify-self: left; | ||
display: flex; | ||
align-items: center; | ||
height: 100%; | ||
/* We add the focus ring manually for keyboard users */ | ||
outline: none; | ||
&[data-focus-visible-added]:focus { | ||
${outlineTemplate(outline)} | ||
} | ||
` | ||
|
||
const AlignedLogoSecondary = styled(LogoSecondary)` | ||
/* Magic number coming up! Need to align the logo as good as possible. | ||
Since this is just a positioning things it's added here and not in the Logo component | ||
*/ | ||
margin-top: -12%; | ||
` | ||
|
||
type LogoLinkProps = AnchorHTMLAttributes<HTMLAnchorElement> | ||
|
||
export const LogoLink = ({ ...rest }: LogoLinkProps) => { | ||
return ( | ||
<StyledLogoLink href="/" aria-label="Equinor home page" {...rest} className="logo" prefetch={false}> | ||
<AlignedLogoSecondary /> | ||
</StyledLogoLink> | ||
<NextLink | ||
href="/" | ||
aria-label="Equinor home page" | ||
{...rest} | ||
className="flex items-center justify-self-start h-full focus:outline-none focus-visible:envis-outline" | ||
prefetch={false} | ||
> | ||
<LogoSecondary className="-mt-[12%]" /> | ||
</NextLink> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters