Skip to content

Commit 0b4f47f

Browse files
committed
add github icon for header
1 parent 8f9feb8 commit 0b4f47f

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"dependencies": {
3131
"react": "^17.0.2",
3232
"react-dom": "^17.0.2",
33+
"react-icons": "^4.3.1",
3334
"react-scripts": "4.0.3",
3435
"react-select": "^5.2.1",
3536
"styled-components": "^5.3.3",

src/components/Header.tsx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import React from 'react';
2+
import { IconContext } from 'react-icons';
3+
import { FaGithub } from 'react-icons/fa';
24
import styled from 'styled-components';
35
import Icon from '../images/icon.png';
46

@@ -9,10 +11,25 @@ export const Header: React.FC<Props> = () => {
911
<Main>
1012
<Image src={Icon} />
1113
<Title>Scrapbox List Marker</Title>
14+
<IconContext.Provider value={githubIconConfig}>
15+
<a
16+
href="https://github.com/penicillin0/scrapbox-list-marker"
17+
target="_blank"
18+
rel="noreferrer"
19+
>
20+
<FaGithub />
21+
</a>
22+
</IconContext.Provider>
1223
</Main>
1324
);
1425
};
1526

27+
const githubIconConfig = {
28+
color: '#444',
29+
size: '22px',
30+
style: { paddingLeft: '52px' },
31+
};
32+
1633
const Main = styled.div`
1734
padding: 7px;
1835
height: 54px;

yarn.lock

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9444,6 +9444,11 @@ react-error-overlay@^6.0.9:
94449444
resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-6.0.9.tgz#3c743010c9359608c375ecd6bc76f35d93995b0a"
94459445
integrity sha512-nQTTcUu+ATDbrSD1BZHr5kgSD4oF8OFjxun8uAaL8RwPBacGBNPf/yAuVVdx17N8XNzRDMrZ9XcKZHCjPW+9ew==
94469446

9447+
react-icons@^4.3.1:
9448+
version "4.3.1"
9449+
resolved "https://registry.yarnpkg.com/react-icons/-/react-icons-4.3.1.tgz#2fa92aebbbc71f43d2db2ed1aed07361124e91ca"
9450+
integrity sha512-cB10MXLTs3gVuXimblAdI71jrJx8njrJZmNMEMC+sQu5B/BIOmlsAjskdqpn81y8UBVEGuHODd7/ci5DvoSzTQ==
9451+
94479452
react-is@^16.7.0, react-is@^16.8.1:
94489453
version "16.13.1"
94499454
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4"

0 commit comments

Comments
 (0)