Skip to content
This repository was archived by the owner on Sep 14, 2022. It is now read-only.

Commit c155de0

Browse files
committed
fix: header padding
1 parent 5b90c44 commit c155de0

File tree

2 files changed

+50
-41
lines changed

2 files changed

+50
-41
lines changed

src/components/Header.tsx

Lines changed: 45 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,54 @@
11
import React from "react";
2-
import { Navbar, Badge } from "react-bootstrap";
2+
import { Navbar, Badge, Container } from "react-bootstrap";
3+
import pkgJson from "../../package.json";
34
import type { FC } from "react";
45
import "@/css/header.css";
5-
import pkgJson from "../../package.json";
66

77
export const Header: FC = () => (
88
<Navbar bg="light">
9-
<Navbar.Brand>
10-
TypeScript ESLint Demo
11-
<Badge variant="secondary" className="version-badge">v{pkgJson.version}</Badge>
12-
</Navbar.Brand>
9+
<Container>
10+
<Navbar.Brand>
11+
TypeScript ESLint Demo
12+
<Badge variant="secondary" className="version-badge">
13+
v{pkgJson.version}
14+
</Badge>
15+
</Navbar.Brand>
1316

14-
<Navbar.Collapse className="justify-content-end">
15-
<Navbar.Text>
16-
<a
17-
className="github-button"
18-
href="https://github.com/yeonjuan/typescript-eslint-demo"
19-
data-icon="octicon-star"
20-
aria-label="Star yeonjuan/typescript-eslint-demo on GitHub"
21-
>
22-
Star
23-
</a>
24-
</Navbar.Text>
25-
<Navbar.Text>
26-
<a
27-
className="github-button"
28-
href="https://github.com/yeonjuan/typescript-eslint-demo/issues"
29-
data-icon="octicon-issue-opened"
30-
aria-label="Issue yeonjuan/typescript-eslint-demo on GitHub"
31-
>
32-
Issue
33-
</a>
34-
</Navbar.Text>
35-
<ul className="version-list">
36-
<li>
37-
<Navbar.Text className="version">
38-
TypeScript-ESLint v
39-
{pkgJson.dependencies["@typescript-eslint/eslint-plugin"]}
40-
</Navbar.Text>
41-
</li>
42-
<li>
43-
<Navbar.Text className="version">
44-
TypeScript v{pkgJson.dependencies["typescript"]}
45-
</Navbar.Text>
46-
</li>
47-
</ul>
48-
</Navbar.Collapse>
17+
<Navbar.Collapse className="justify-content-end">
18+
<Navbar.Text className="gh-btn">
19+
<a
20+
className="github-button"
21+
href="https://github.com/yeonjuan/typescript-eslint-demo"
22+
data-icon="octicon-star"
23+
aria-label="Star yeonjuan/typescript-eslint-demo on GitHub"
24+
>
25+
Star
26+
</a>
27+
</Navbar.Text>
28+
<Navbar.Text className="gh-btn">
29+
<a
30+
className="github-button"
31+
href="https://github.com/yeonjuan/typescript-eslint-demo/issues"
32+
data-icon="octicon-issue-opened"
33+
aria-label="Issue yeonjuan/typescript-eslint-demo on GitHub"
34+
>
35+
Issue
36+
</a>
37+
</Navbar.Text>
38+
<ul className="version-list">
39+
<li>
40+
<Navbar.Text className="version">
41+
TypeScript-ESLint v
42+
{pkgJson.dependencies["@typescript-eslint/eslint-plugin"]}
43+
</Navbar.Text>
44+
</li>
45+
<li>
46+
<Navbar.Text className="version">
47+
TypeScript v{pkgJson.dependencies["typescript"]}
48+
</Navbar.Text>
49+
</li>
50+
</ul>
51+
</Navbar.Collapse>
52+
</Container>
4953
</Navbar>
5054
);

src/css/header.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ header {
55
.version-badge {
66
margin-left: 10px;
77
}
8+
9+
.gh-btn {
10+
margin-left: 10px;
11+
}
12+
813
ul {
914
margin-bottom: 0;
1015
}

0 commit comments

Comments
 (0)