-
Notifications
You must be signed in to change notification settings - Fork 102
Expand file tree
/
Copy pathRepositoryItemTopBar.tsx
More file actions
44 lines (41 loc) · 1.11 KB
/
RepositoryItemTopBar.tsx
File metadata and controls
44 lines (41 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import { Repository } from "../types";
import { RepositoryIssueNumberIndicator } from "./RepositoryIssueNumberIndicator";
type RepositoryItemTopBarProps = {
isIssueOpen: boolean;
repositoryHasNewIssues: boolean;
repositoryName: Repository["name"];
repositoryNumIssues: number;
repositoryOwner: Repository["owner"];
repositoryUrl: Repository["url"];
repositoryTopics: Repository["topics"];
};
export const RepositoryItemTopBar = ({
isIssueOpen,
repositoryName,
repositoryOwner,
repositoryUrl
}: RepositoryItemTopBarProps) => {
return (
<div className="repo-item__top-bar">
<a
href={repositoryUrl}
rel="noopener noreferrer"
target="_blank"
title={`Open ${repositoryOwner}/${repositoryName} on GitHub`}
>
<h3>
<div className="repo-item__owner">
{repositoryOwner}
</div>
<span> / </span>
<div className="repo-item__name">
{repositoryName}
</div>
</h3>
</a>
<RepositoryIssueNumberIndicator
isIssueOpen={isIssueOpen}
/>
</div>
);
};