File tree Expand file tree Collapse file tree 1 file changed +18
-28
lines changed Expand file tree Collapse file tree 1 file changed +18
-28
lines changed Original file line number Diff line number Diff line change 1
1
import React from "react"
2
- import styled from "@emotion/styled"
3
- import Translation from "./Translation"
4
-
5
- const Div = styled . div `
6
- background-color: ${ ( props ) => props . theme . colors . primary } ;
7
- `
8
-
9
- const Anchor = styled . a `
10
- line-height: 2rem;
11
- position: absolute;
12
- top: -3rem;
13
- margin-left: 0.5rem;
14
- color: ${ ( props ) => props . theme . colors . background } ;
15
- text-decoration: none;
2
+ import { Box } from "@chakra-ui/react"
16
3
17
- &:focus {
18
- position: static;
19
- }
20
- `
21
-
22
- const DivAnchor = styled . div `
23
- height: 80px;
24
- margin-top: -80px;
25
- `
4
+ import Translation from "./Translation"
5
+ import Link from "../components/Link"
26
6
27
7
export interface IProps {
28
8
hrefId : string
29
9
}
30
10
31
11
export const SkipLink : React . FC < IProps > = ( { hrefId } ) => {
32
12
return (
33
- < Div >
34
- < Anchor href = { hrefId } >
13
+ < Box bg = "primary" >
14
+ < Link
15
+ href = { hrefId }
16
+ lineHeight = "taller"
17
+ position = "absolute"
18
+ top = "-12"
19
+ ml = "2"
20
+ color = "background"
21
+ textDecorationLine = "none"
22
+ _hover = { { textDecoration : "none" } }
23
+ _focus = { { position : "static" } }
24
+ >
35
25
< Translation id = "skip-to-main-content" />
36
- </ Anchor >
37
- </ Div >
26
+ </ Link >
27
+ </ Box >
38
28
)
39
29
}
40
30
41
31
export const SkipLinkAnchor : React . FC < { id : string } > = ( { id } ) => {
42
- return < DivAnchor id = { id } > </ DivAnchor >
32
+ return < Box height = "80px" mt = "-80px" id = { id } > </ Box >
43
33
}
You can’t perform that action at this time.
0 commit comments