File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change 1
1
import React from "react"
2
- import styled from "styled-components"
2
+ import styled , { DefaultTheme } from "styled-components"
3
3
import Icon from "./Icon"
4
4
import Link from "./Link"
5
5
import Emoji from "./Emoji"
6
6
7
+ export interface IProps {
8
+ to : string
9
+ theme ?: DefaultTheme
10
+ className ?: string
11
+ }
12
+
7
13
const Container = styled ( Link ) `
8
14
position: relative;
9
15
z-index: 1;
@@ -43,22 +49,23 @@ const Arrow = styled(Icon)`
43
49
margin: 0rem 1.5rem;
44
50
align-self: center;
45
51
min-width: 2rem;
52
+ color: ${ ( { theme } ) => theme . colors . text } ;
46
53
`
47
54
48
55
const EmojiCell = styled . div `
49
56
display: flex;
50
57
align-items: center;
51
58
`
52
59
53
- const DocLink = ( { to, children, className } ) => (
54
- < Container to = { to } className = { className } >
60
+ const DocLink : React . FC < IProps > = ( { to, children, className, theme } ) => (
61
+ < Container to = { to } className = { className || "" } >
55
62
< EmojiCell >
56
63
< Emoji size = { 1 } text = ":page_with_curl:" mr = { `1rem` } />
57
64
</ EmojiCell >
58
65
< TextCell >
59
66
< Title > { children } </ Title >
60
67
</ TextCell >
61
- < Arrow name = "arrowRight" color = { ( { theme } ) => theme . colors . text } />
68
+ < Arrow name = "arrowRight" />
62
69
</ Container >
63
70
)
64
71
You can’t perform that action at this time.
0 commit comments