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